MaxwellMayaEmbeddedMaterial class
Description
This class represents embedded materials, i.e. materials which store their settings directly in the exported scene file. A Maxwell material is made up of one or more layers and each layer can contain BSDF, emitter, displacement and coating components. Layers are blended using opacity values or masks. For more details on the Maxwell material model, see this section of the main manual.
You can create a referenced material by calling MaxwellMayaAPI::CreateEmbeddedMaterial
. The inherited GetMaterialType
method returns MaterialType_Embedded
.
Base class: MaxwellMayaMaterial
.
Methods
void | Clear() |
MaxwellMayaMaterialLayer* | AddLayer() |
unsigned int | GetNumLayers() const |
MaxwellMayaMaterialLayer* | GetLayer(unsigned int index) |
const MaxwellMayaMaterialLayer* | GetLayer(unsigned int index) const |
MaxwellMayaMaterialAttrs* | GetAttributes() |
const MaxwellMayaMaterialAttrs* | GetAttributes() const |
bool | LoadFromFile(const MString& fileName) |
bool | SaveToFile(const MString& fileName) const |
Inherited methods |
void Clear()
Removes all the layers from this material.
MaxwellMayaMaterialLayer* AddLayer()
Adds a new layer to the material.
unsigned int GetNumLayers() const
Returns the number of layers contained in this material. This method does not exist in Python, where you can retrieve a list of all the layers by calling the GetLayers
method.
MaxwellMayaMaterialLayer* GetLayer(unsigned int index)
const MaxwellMayaMaterialLayer* GetLayer(unsigned int index) const
Returns the layer at the specified index, or NULL if the index is invalid. This method does not exist in Python, where you can retrieve a list of all the layers by calling the GetLayers
method.
MaxwellMayaMaterialAttrs* GetAttributes()
const MaxwellMayaMaterialAttrs* GetAttributes() const
Returns an object which can be used to manipulate settings which apply to the entire material, such as dispersion or material ID color.
bool LoadFromFile(const MString& fileName)
Loads all the material parameters from the specified MXM file (destroying the previous settings). The C++ version returns false if the file cannot be read, while the Python version raises a maxwell.ParameterError
exception.
bool SaveToFile(const MString& fileName) const
Saves the material settings to the given MXM file. The C++ version returns false if the file cannot be written, while the Python version raises a maxwell.ParameterError
exception.