Module vrMaterialEditor
[frames] | no frames]

Module vrMaterialEditor

Most functions in this module are deprecated; use API v2 vrMaterialService and vrdMaterial types instead.

Functions
 
applyEnvToAllMaterials(mat)
Deprecated: Use vrMaterialService.applyEnvironmentToAllMaterials(mat, "") in API v2.
 
applyEnvToAllMaterials(mat, mat_name)
Deprecated: Use vrMaterialService.applyEnvironmentToAllMaterials(mat, mat_name) in API v2.
 
applyEnvToSelectedNodes(mat, nodes)
Deprecated: Use vrMaterialService.applyEnvironmentToNodes(mat, nodes) in API v2.
 
applySubstancePresetByIndex(mat, index)
Deprecated: Use vrdSubstanceMaterial.applyPreset(index, vrSubstanceTypes::PresetApplyMode.ApplyAndReset, False) in API v2.
 
applySubstancePresetByName(mat, name)
Deprecated: Use vrdSubstanceMaterial.applyPreset(index, vrSubstanceTypes::PresetApplyMode.ApplyAndReset, False) in API v2.
 
applySubstancePresetWithDefaultOutputSizeByIndex(mat, index)
Deprecated: Use vrdSubstanceMaterial.applyPreset(index, vrSubstanceTypes::PresetApplyMode.ApplyAndReset, True) in API v2.
 
applySubstancePresetWithDefaultOutputSizeByName(mat, name)
Deprecated: Use vrdSubstanceMaterial.applyPreset(index, vrSubstanceTypes::PresetApplyMode.ApplyAndReset, True) in API v2.
 
clearSubstancePresetCache()
Clears the substance preset cache.
 
deleteMaterials(mat_name)
Deprecated: Use vrMaterialService.deleteMaterials(materials) in API v2.
 
enableSubstancePresetCache(enabled)
Enables caching of preset render results.
list of vrMaterialPtrs
getSelectedMaterials()
Deprecated: Use vrMaterialService.getMaterialSelection() in API v2.
 
getSubstanceArchivePath(mat)
Deprecated: Use vrdSubstanceMaterial.getArchivePath() in API v2.
 
getSubstancePresets(mat)
Deprecated: Use vrdSubstanceMaterial.getPresets() in API v2.
 
importMaterialLibraryAndApply(filename)
Deprecated, use applyMaterialAssetsByName instead.
 
loadMeasurement(mat, measurementFilePath)
Deprecated: Use vrdXRiteMeasuredMaterial.setMeasurement(measurementFilePath) or vrdOCSMaterial.setOCSBRDFFilename(filepath) in API v2.
 
loadSubstanceArchive(mat, archiveFilePath)
Deprecated: Use vrdSubstanceMaterial.loadArchive(path) in API v2.
 
loadSubstancePresets(mat, presetsFilePath)
Deprecated: Use vrdSubstanceMaterial.importPresets(paths, False) in API v2.
 
selectMaterial(mat)
Deprecated: Use vrMaterialService.setMaterialSelection([mat]) in API v2.
 
selectMaterialByIndex(i)
Selects a material by index.
 
selectMaterialByName(name)
Selects a material by name.
 
selectMaterialByNode(id)
Selects a material by node id.
 
selectMaterials(mats)
Deprecated: Use vrMaterialService.setMaterialSelection(mats) in API v2.
 
setMaterialAmbientColor(index, hue, saturation, value)
Deprecated.
 
setMaterialDiffuseColor(index, hue, saturation, value)
Deprecated.
 
setMeasuredCarpaintGlossyAsDiffuseLobes(mat, lobes)
Sets which glossy lobes of an measured carpaint axf material are handled as diffuse when rendering with renderpasses!
 
undeleteMaterials(mat_name)
Deprecated: Do not use.
 
updateMaterials()
Updates the material list.
 
updateSubstanceMaterial(mat)
Triggers an update of the given substance material.
Function Details

applyEnvToAllMaterials(mat)

 

Deprecated: Use vrMaterialService.applyEnvironmentToAllMaterials(mat, "") in API v2.

Applies an environment material to all materials.

Parameters:
  • mat (MaterialPtr) - The pointer to the environment material.

applyEnvToAllMaterials(mat, mat_name)

 

Deprecated: Use vrMaterialService.applyEnvironmentToAllMaterials(mat, mat_name) in API v2.

Applies an environment material to all materials.

Parameters:
  • mat (MaterialPtr) - The pointer to the environment material.
  • mat_name (string) - Replace only environment materials with this name.

applyEnvToSelectedNodes(mat, nodes)

 

Deprecated: Use vrMaterialService.applyEnvironmentToNodes(mat, nodes) in API v2.

Parameters:
  • mat (MaterialPtr) - The pointer to the environment material.
  • nodes (list of NodePtr) - List of nodes

applySubstancePresetByIndex(mat, index)

 

Deprecated: Use vrdSubstanceMaterial.applyPreset(index, vrSubstanceTypes::PresetApplyMode.ApplyAndReset, False) in API v2.

Applies an existing substance preset to the given substance material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be a SubstanceMaterial.
  • index (integer) - The index of the preset. A list of presets can be queried with getSubstancePresets().

applySubstancePresetByName(mat, name)

 

Deprecated: Use vrdSubstanceMaterial.applyPreset(index, vrSubstanceTypes::PresetApplyMode.ApplyAndReset, False) in API v2.

Applies an existing substance preset to the given substance material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be a SubstanceMaterial.
  • name (string) - The name of the preset. A list of presets can be queried with getSubstancePresets().

applySubstancePresetWithDefaultOutputSizeByIndex(mat, index)

 

Deprecated: Use vrdSubstanceMaterial.applyPreset(index, vrSubstanceTypes::PresetApplyMode.ApplyAndReset, True) in API v2.

Applies an existing substance preset with default output size to the given substance material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be a SubstanceMaterial.
  • index (integer) - The index of the preset. A list of presets can be queried with getSubstancePresets().

applySubstancePresetWithDefaultOutputSizeByName(mat, name)

 

Deprecated: Use vrdSubstanceMaterial.applyPreset(index, vrSubstanceTypes::PresetApplyMode.ApplyAndReset, True) in API v2.

Applies an existing substance preset with default output size to the given substance material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be a SubstanceMaterial.
  • name (string) - The name of the preset. A list of presets can be queried with getSubstancePresets().

deleteMaterials(mat_name)

 

Deprecated: Use vrMaterialService.deleteMaterials(materials) in API v2.

Delete materials or material groups.

Parameters:
  • mat_name (list of NodePtr) - List of MaterialGroup or Group nodes.

enableSubstancePresetCache(enabled)

 

Enables caching of preset render results. Switching presets will get faster but more memory and disk space is required.

Parameters:
  • enabled (bool) - Enables or disables the caching

getSelectedMaterials()

 

Deprecated: Use vrMaterialService.getMaterialSelection() in API v2.

Returns a list of the selected materials of the group view.

Returns: list of vrMaterialPtrs
The list of selected materials.

getSubstanceArchivePath(mat)

 

Deprecated: Use vrdSubstanceMaterial.getArchivePath() in API v2.

Returns the path to the substance archive contained in the given substance material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be a SubstanceMaterial.

getSubstancePresets(mat)

 

Deprecated: Use vrdSubstanceMaterial.getPresets() in API v2.

Returns the list of presets contained in the given substance material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be a SubstanceMaterial.

importMaterialLibraryAndApply(filename)

 

Deprecated, use applyMaterialAssetsByName instead. Loads the specified material library from an .osb file and applies it to the scene.

Parameters:
  • filename (string) - The path to the material library.

loadMeasurement(mat, measurementFilePath)

 

Deprecated: Use vrdXRiteMeasuredMaterial.setMeasurement(measurementFilePath) or vrdOCSMaterial.setOCSBRDFFilename(filepath) in API v2.

Loads a measurement file to the given material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be an XRiteMeasuredMaterial or OCSMaterial.
  • measurementFilePath (string) - The path to the measurement file.

loadSubstanceArchive(mat, archiveFilePath)

 

Deprecated: Use vrdSubstanceMaterial.loadArchive(path) in API v2.

Loads a substance archive to the given substance material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be a SubstanceMaterial.
  • archiveFilePath (string) - The path to a substance archive.

loadSubstancePresets(mat, presetsFilePath)

 

Deprecated: Use vrdSubstanceMaterial.importPresets(paths, False) in API v2.

Loads a substance presets file to the given substance material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be a SubstanceMaterial.
  • presetsFilePath (string) - The path to a substance presets file.

selectMaterial(mat)

 

Deprecated: Use vrMaterialService.setMaterialSelection([mat]) in API v2.

Selects a material by material id or material pointer.

Parameters:
  • mat (MaterialPtr or unsigned integer) - The pointer to the material or the material id.

selectMaterialByIndex(i)

 

Selects a material by index.

Parameters:
  • i (unsigned integer) - The index.

selectMaterialByName(name)

 

Selects a material by name.

Parameters:
  • name (string) - The name.

selectMaterialByNode(id)

 

Selects a material by node id.

Parameters:
  • id (unsigned integer) - The node id.

selectMaterials(mats)

 

Deprecated: Use vrMaterialService.setMaterialSelection(mats) in API v2.

Selects multiple materials by a list of material pointers.

Parameters:
  • mats (list of vrMaterialPtrs) - The material pointers.

setMaterialAmbientColor(index, hue, saturation, value)

 

Deprecated. Sets ambient color of a SimpleMaterial or ChunkMaterialby material index.

Parameters:
  • index (unsigned integer) - The index of the material.
  • hue (integer) - Hue.
  • saturation (integer) - Saturation.
  • value (integer) - Value.

setMaterialDiffuseColor(index, hue, saturation, value)

 

Deprecated. Sets diffuse color of a SimpleMaterial or ChunkMaterial by material index.

Parameters:
  • index (unsigned integer) - The index of the material.
  • hue (integer) - Hue.
  • saturation (integer) - Saturation.
  • value (integer) - Value.

setMeasuredCarpaintGlossyAsDiffuseLobes(mat, lobes)

 

Sets which glossy lobes of an measured carpaint axf material are handled as diffuse when rendering with renderpasses!

Parameters:
  • mat (vrMaterialPtr) - The measured material container
  • lobes (unsigned integer) - The number of lobes considered to be diffuse. Default is 0 so only the real diffuse channel is used for the diffuse pass.

undeleteMaterials(mat_name)

 

Deprecated: Do not use. Restores materials from trash.

Parameters:
  • mat_name (list of NodePtr) - List of MaterialGroup or Group nodes in trash.

updateSubstanceMaterial(mat)

 

Triggers an update of the given substance material.

Parameters:
  • mat (MaterialPtr) - The pointer to the material. This needs to be a SubstanceMaterial.