vrdMaterialXMaterial

class vrdMaterialXMaterial

(Inherits vrdBRDFMaterial)

This class is used to handle all MaterialX based material properties.

Functions

vrdMaterialXMaterial.getActiveAttributeGroups()

Gets access to all vrdAttributeGroup objects.

Returns:All vrdAttributeGroup objects
Return type:List[vrdAttributeGroup]
vrdMaterialXMaterial.getActiveMaterialName()

Gets the name of the active material.

Returns:The name of the material.
Return type:string
vrdMaterialXMaterial.getActiveMaterialProperty(parameterId)

Query the value of a MaterialX property in the active material.

Parameters:parameterId (string) – Property ID
Returns:The value for this property
Return type:QVariant
vrdMaterialXMaterial.getMaterialIndex()

Gets the index of the material in the MaterialX Document. For the first material it is zero.

Returns:The index of the loaded material.
Return type:integer
vrdMaterialXMaterial.getPath()

Get the path of the underlying MaterialX Document.

Returns:The path of the underlying MaterialX Document.
Return type:string
vrdMaterialXMaterial.getProperties()

Returns a list of all properties.

Returns:The list of all properties.
Return type:vrdMaterialXProperties
vrdMaterialXMaterial.hasData()

Check if a MaterialX Document was successfully loaded.

Returns:True, if MaterialX data is available.
Return type:bool
vrdMaterialXMaterial.isDataValid()

Check if a MaterialX Document is valid.

Returns:True, if MaterialX data is valid.
Return type:bool
vrdMaterialXMaterial.loadMaterial(path, index)

Load a MaterialX to this material.

Parameters:
  • path (string) – The path for the MaterialX Document.
  • index (integer) – The index of the material in the MaterialX Document to load.
Returns:

True, if the MaterialX was successfully loaded.

Return type:

bool

vrdMaterialXMaterial.resetMaterial()

Resets a material to its default state.

vrdMaterialXMaterial.setActiveMaterialProperty(parameterId, value)

Sets a MaterialX property for the active material.

Parameters:
  • parameterId (string) – Property ID
  • value (QVariant) – New value for the property