Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

CmaterialPointer.

Methods

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.

Inherited methods

NameDescription
isNullChecks whether the object is null.

Anchor
cmaxwellcbsdfsetname
cmaxwellcbsdfsetname

...

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

Return value

0 = Error setting BSDF's name.

1 = Success.

Anchor
cmaxwellcbsdfgetname
cmaxwellcbsdfgetname

...

LanguageSyntax
C++char* getName()
Pythonstr getName()

Return value

String containing the BSDF's name.

Anchor
cmaxwellcbsdfsetstate
cmaxwellcbsdfsetstate

...

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

Return value

0 = Error setting BSDF's state.

1 = Success.

Anchor
cmaxwellcbsdfgetstate
cmaxwellcbsdfgetstate

...

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

Return value

C++

0 = Error getting BSDF's state.

1 = Success.

Python

BSDF's state.

Anchor
cmaxwellcbsdfsetweight
cmaxwellcbsdfsetweight

...

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

int setWeight( Cmap map )

 int setActiveWeight( Cmap map )

Return value

C++

...

0 = Error setting weight map.

1 = Success.

Anchor
cmaxwellcbsdfgetweight
cmaxwellcbsdfgetweight

...

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

Return value

C++

0 = Error getting weight map.

1 = Success.

Python

Cmap containing the weight value (Cmap.value).

Anchor
cmaxwellcbsdfgetreflectance
cmaxwellcbsdfgetreflectance

...

Returns the reflectance pointer of this BSDF.

LanguageSyntax
C++Cmaxwell::Creflectance getReflectance()
PythonCreflectance getReflectance()

Return value

Creflectance object.

Anchor
cmaxwellcbsdfsetcolor
cmaxwellcbsdfsetcolor

...

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

0 = Error setting map.

1 = Success.

Python ("get" methods)

Cmap containing the color requested.

Examples

Code Block
languagecpp
titleC++
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 );
language
Code Block
javascripttitlePython
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 );

...

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

Return value

C++

...

0 = Error setting normal map state.

1 = Success.

Anchor
cmaxwellcbsdfgetnormalmapstate
cmaxwellcbsdfgetnormalmapstate

...

LanguageSyntax
C++byte getNormalMapState( bool& state )
Pythonbool getNormalMapState()

Return value

C++

0 = Error getting normal mapping state.

1 = Success.

Python

True = normal mapping on.

False = normal mapping off.

Anchor
cmaxwellcbsdfaddcoating
cmaxwellcbsdfaddcoating

...

Adds a new coating to this BSDF.

LanguageSyntax
C++Cmaxwell::Ccoating addCoating()
PythonCcoating addCoating()

Return value

Cmaxwell::Ccoating object (linked to the scene).

Anchor
cmaxwellcbsdfgetcoating
cmaxwellcbsdfgetcoating

...

Gets a coating of this BSDF.

LanguageSyntax
C++Cmaxwell::Ccoating getCoating( byte index )
PythonCcoating getCoating( int index )

Return value

Cmaxwell::Ccoating object (linked to the scene).

Anchor
cmaxwellcbsdfgetnumcoatings
cmaxwellcbsdfgetnumcoatings

...

LanguageSyntax
C++byte getNumCoatings( byte& nCoatings )
Pythonint getNumCoatings()

Return value

C++

0 = Error getting number of coatings.

1 = Success.

Python

Number of coatings.