vrdMDLMaterial

class vrdMDLMaterial

(Inherits vrdBRDFMaterial)

This class is used to handle all MDL module based material properties.

An MDL material represents a module and can contain multiple materials.

Functions

vrdMDLMaterial.getActiveAttributeGroups()

Gets access to all vrdAttributeGroup objects.

Returns:All vrdAttributeGroup objects
Return type:List[vrdAttributeGroup]
vrdMDLMaterial.getActiveMaterialIndex()

Gets the index of the active material. For the first material it is zero.

Returns:The index of the active material.
Return type:integer
vrdMDLMaterial.getActiveMaterialName()

Gets the name of the active material.

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

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

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

Gets the number of all materials.

Returns:The number of all materials.
Return type:integer
vrdMDLMaterial.getMaterialName(index)

Gets the name of a material.

Parameters:index (integer) – The index of the material.
Returns:The name of the material.
Return type:string
vrdMDLMaterial.getModulePath()

Get the path of the underlying MDL module file.

Returns:The path of the underlying MDL module file.
Return type:string
vrdMDLMaterial.getProperties()

Returns a list of all properties.

Returns:The list of all properties.
Return type:vrdMDLProperties
vrdMDLMaterial.getProperty(materialName, parameterId)

Query the value of a MDL property.

Parameters:
  • materialName (string) – Name of a MDL material
  • parameterId (string) – Property ID
Returns:

The value for this property

Return type:

QVariant

vrdMDLMaterial.hasModuleData()

Check if a MDL module file was successfully loaded.

Returns:True, if MDL module data are available.
Return type:bool
vrdMDLMaterial.isModuleValid()

Check if a MDL module file is valid.

Returns:True, if MDL module data is valid.
Return type:bool
vrdMDLMaterial.loadModule(path)

Load a MDL module to this material.

Parameters:path (string) – The path for the MDL module file.
Returns:True, if the MDL module was successfully loaded.
Return type:bool
vrdMDLMaterial.resetMaterial()

Resets a material to its default state.

vrdMDLMaterial.setActiveMaterialIndex(index)

Gets the index of the active material.

Parameters:index (integer) –
vrdMDLMaterial.setActiveMaterialProperty(parameterId, value)

Sets a MDL property for the active material.

Parameters:
  • parameterId (string) – Property ID
  • value (QVariant) – New value for the property
vrdMDLMaterial.setProperty(materialName, parameterId, value)

Sets a MDL property.

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