Versions Compared

Key

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

...

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

Anchor
cmaxwellcbsdfsetweight
cmaxwellcbsdfsetweight

setWeight, setActiveWeight

To set the weight of this BSDF in its parent layer.

map.type must be CmultiValue::Cmap::TYPE_VALUE, CmultiValue::Cmap::TYPE_BITMAP.

LanguageSyntax
C++byte setWeight( CmultiValue::Cmap& map )
 byte setActiveWeight( CmultiValue::Cmap& map )
Python

int setWeight( Cmap map )

 int setActiveWeight( Cmap map )

Return values

0 = Error setting weight map.

1 = Success.

Anchor
cmaxwellcbsdfgetweight
cmaxwellcbsdfgetweight

getWeight, getActiveWeight

To get the weight of this BSDF in its parent layer.

LanguageSyntax
C++byte getWeight( CmultiValue::Cmap& map )
 byte getActiveWeight( CmultiValue::Cmap& map )
PythonCmap getWeight()
 Cmap getActiveWeight()

Return valuess

0 = Error getting weight map.

1 = Success

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 );

...