...
Methods
Name | Description |
---|---|
setName | 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 | Enables/disables normal mapping for the bump parameter of this BSDF. |
getNormalMapState | Gets BSDF normal mapping state (on/off). |
addCoating | Add a new coating to this BSDF. |
getCoating | Get a coating of this BSDF. |
getNumCoatings | Get number of coatings of this BSDF. |
...
Language | Syntax |
---|---|
C++ | byte getWeight( CmultiValue::Cmap& map ) |
byte getActiveWeight( CmultiValue::Cmap& map ) | |
Python | Cmap getWeight() |
Cmap getActiveWeight() |
Return value
...
0 = Error getting weight map.
1 = Success.
Python
Cmap containing the weight value (Cmap.value).
Anchor | ||||
---|---|---|---|---|
|
...
Returns the reflectance pointer of this BSDF.
Language | Syntax |
---|---|
C++ | Cmaxwell::Creflectance getReflectance() |
Python | Creflectance getReflectance() |
Return value
Creflectance object.
Anchor | ||||
---|---|---|---|---|
|
...
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( str pID, Cmap map ); |
Cmap getColor( str pID ); | |
int setActiveColor( str pID, Cmap map ); | |
Cmap getActiveColor( str pID ); |
Return value
C++ (all) and Python ("set" methods)
...
1 = Success.
Python ("get" methods)
Cmap containing the color requested.
...
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 ); |
...
Gets a coating of this BSDF.
Language | Syntax |
---|---|
C++ | Cmaxwell::Ccoating getCoating( byte index ) |
Python | Ccoating getCoating( int index ) |
Return value
Cmaxwell::Ccoating object (linked to the scene).
...
Python
Number of coatings.
...