...
Methods
Name | Description |
---|---|
setName | |
getName | |
setState | |
getState | |
setWeight | |
getWeight | |
setActiveWeight | |
getActiveWeight | |
getReflectance | |
setColor | |
getColor | |
setActiveColor | |
getActiveColor | |
setNormalMapState | |
getNormalMapState | |
addCoating | |
getCoating | |
Sets BSDF's name. | |
getName | Gets BSDF's name. |
setState | To switch on/off the BSDF. |
getState | Gets BSDF state (on/off). |
setWeight | To set the weight of this BSDF in its parent layer. |
getWeight | To get the weight of this BSDF in its parent layer. |
setActiveWeight | To set the weight of this BSDF in its parent layer. |
getActiveWeight | To get the weight of this BSDF in its parent layer. |
getReflectance | Returns the reflectance pointer of this BSDF. |
setColor | Sets the value/texture of the given parameter. |
getColor | Gets the value/texture of the given parameter. |
setActiveColor | Sets the value/texture of the given parameter. |
getActiveColor | Gets the value/texture of the given parameter. |
setNormalMapState | |
getNormalMapState | |
addCoating | |
getCoating | |
getNumCoatings |
Anchor | ||||
---|---|---|---|---|
|
setColor, getColor, setActiveColor, getActiveColor
Sets/gets the value/texture of the given parameter.
Languaje | Syntax |
---|---|
C++ | byte setColor( const char* pID, CmultiValue::Cmap& map ); |
byte getColor( const char* pID, CmultiValue::Cmap& map ); | |
byte setActiveColor( const char* pID, CmultiValue::Cmap& map ); | |
byte getActiveColor( const char* pID, CmultiValue::Cmap& map ); | |
Python | int setColor( pID, map ); |
Cmap getColor( pID ); | |
int setActiveColor( pID, map ); | |
Cmap getActiveColor( pID ); |
Return value
0 = Error setting map.
1 = Success.
Examples
Code Block | ||||
---|---|---|---|---|
| ||||
Cmaxwell::CmaterialLayer layer = material.addLayer();
Cmaxwell::Cbsdf bsdf = layer.addBSDF();
Cmaxwell::CmultiValue::Cmap mvMap;
mvMap.type = Cmaxwell::CmultiValue::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 ); |
Code Block | ||||
---|---|---|---|---|
| ||||
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 ); |