Versions Compared

Key

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

...

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.

Anchor
cmaxwellcbsdfgetreflectance
cmaxwellcbsdfgetreflectance

...

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( pID, map );
 Cmap getColor( pID );
 int setActiveColor( pID, map );
 Cmap getActiveColor( pID );

Return value

C++

0 = Error setting map.

1 = Success.

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

...

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

Return

...

value

C++

0 = Error setting normal map state.

1 = Success.

Anchor
cmaxwelldbsdfgetnormalmapstate
cmaxwelldbsdfgetnormalmapstate

getNormalMapState

Gets BSDF normal mapping state (on/off).

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

Return value

C++

0 = Error getting normal mapping state.

1 = Success.

Anchor
cmaxwellcbsdfaddcoating
cmaxwellcbsdfaddcoating

addCoating

Adds a new coating to this BSDF.

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

Anchor
cmaxwellcbsdfgetcoating
cmaxwellcbsdfgetcoating

getCoating

Gets a coating of this BSDF.

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

Anchor
cmaxwellcbsdfgetnumcoatings
cmaxwellcbsdfgetnumcoatings

getNumcoatings

Get number of coatings of this BSDF.

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

Return value

C++

0 = Error getting number of coatings.

1 = Success