Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameDescription
setNameSets BSDF's name.
getNameGets BSDF's name.
setStateTo switch on/off the BSDF.
getStateGets BSDF state (on/off).
setWeightTo set the weight of this BSDF in its parent layer.
getWeightTo get the weight of this BSDF in its parent layer.
setActiveWeightTo set the weight of this BSDF in its parent layer.
getActiveWeightTo get the weight of this BSDF in its parent layer.
getReflectanceReturns the reflectance pointer of this BSDF.
setColorSets the value/texture of the given parameter.
getColorGets the value/texture of the given parameter.
setActiveColorSets the value/texture of the given parameter.
getActiveColorGets the value/texture of the given parameter.
setNormalMapStateEnables/disables  normal mapping for the bump parameter of this BSDF.
getNormalMapStateGets BSDF normal mapping state (on/off).
addCoatingAdd a new coating to this BSDF.
getCoatingGet a coating of this BSDF.
getNumCoatingsGet number of coatings of this BSDF.

...

LanguageSyntax
C++byte setName( const char* pName );
Pythonint setName( str name );

Anchor
cmaxwellcbsdfgetname
cmaxwellcbsdfgetname

...

LanguageSyntax
C++char* getName();
Pythonname getName();str getName()

Anchor
cmaxwellcbsdfsetstate
cmaxwellcbsdfsetstate

setState

To switch on/off the BSDF.

LanguageSyntax
C++byte setState( bool enabled )
Pythonint setState( bool enabled )

Anchor
cmaxwellcbsdfgetstate
cmaxwellcbsdfgetstate

getState

Gets BSDF state (on/off).

LanguageSyntax
C++byte getState( bool& enabled )
Pythonbool getState()

Anchor
cmaxwellcbsdfsetcolor
cmaxwellcbsdfsetcolor

...

Code Block
languagejavascript
titlePython
layer = material.addLayer();
bsdf = layer.addBSDF();
mvMap = Cmap();
mvMap.type = Cmap::TYPE_VALUE; (roughness will use a numeric value instead of a texture)
mvMap.value = 77.0;
bsdf.setColor( 'roughness', mvMap );
bsdf.setActiveColor( 'roughness', mvMap );

...