Module vrMaterialPtr
[frames] | no frames]

Module vrMaterialPtr

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

Classes
MaterialPtr
vrMaterialPtr
Most functions of vrMaterialPtr are deprecated, use API v2 vrdMaterial types instead.
Functions
 
addMaterialTag(material, tag)
Deprecated: Use vrMetadataService.addTags in API v2.
 
addMaterialTag(materials, tag)
Deprecated: Use vrMetadataService.addTags in API v2.
 
addMaterialTags(material, tags)
Deprecated: Use vrMetadataService.addTags in API v2.
 
addMaterialTags(materials, tags)
Deprecated: Use vrMetadataService.addTags in API v2.
 
removeMaterialTag(material, tag)
Deprecated: Use vrMetadataService.removeTags in API v2.
 
removeMaterialTag(materials, tag)
Deprecated: Use vrMetadataService.removeTags in API v2.
 
removeMaterialTags(material, tags)
Deprecated: Use vrMetadataService.removeTags in API v2.
 
removeMaterialTags(materials, tags)
Deprecated: Use vrMetadataService.removeTags in API v2.
 
replaceMaterialTag(material, oldTag, newTag)
Deprecated: Use vrMetadataService.renameTag in API v2.
 
replaceMaterialTag(materials, oldTag, newTag)
Deprecated: Use vrMetadataService.renameTag in API v2.
vrMaterialPtr
createMaterial(type)
Deprecated: Use vrMaterialService.createMaterial(name, type) in API v2.
vrMaterialPtr
findMaterial(name)
Deprecated: Use vrMaterialService.findMaterial(name) in API v2.
list of vrMaterialPtrs
findMaterials(name, regexp)
See vrMaterialService.findMaterials(name) in API v2.
list of vrMaterialPtrs
getAllMaterials()
Deprecated: Use vrMaterialService.getAllMaterials() in API v2.
 
getMaterialTags(material)
Deprecated: Use vrMetadataService.getTags() in API v2.
list of vrMaterialPtrs
getMaterialsWithTag(tag)
Deprecated: Use vrMaterialService.getMaterialsWithAnyTag in API v2.
list of vrMaterialPtrs
getMaterialsWithTags(tags, matchAllTags)
Deprecated: Use vrMaterialService.getMaterialsWithAnyTag or vrMaterialService.getMaterialsWithAllTags in API v2.
 
hasMaterialTag(material, tag)
Deprecated: Use vrMetadataService.hasTag() in API v2.
 
hasMaterialTags(material, tag)
Deprecated: Use vrMetadataService.getTags() in API v2.
 
setEnvironmentImage(mat, image_path)
Deprecated: Use vrImageService.loadImage(image_path, vrImageTypes.LoadType.Environment) and envMat.setEnvironment(img) in API v2.
 
setMaterialImage(mat, field_name, image_path)
Deprecated: Use vrImageService.loadImage(image_path) and e.g.
 
setSwitchMaterialChoice(name, choice)
Deprecated: Use vrdSwitchMaterial.setChoice(choice) in API v2.
 
setTextureTransform(mat, translate, rotate, scale)
Changes the input coordinate transformation for texture projections in ubermaterials.
vrMaterialPtr
toMaterial(id)
Returns a material pointer corresponding to the material id provided.
Function Details

addMaterialTag(material, tag)

 

Deprecated: Use vrMetadataService.addTags in API v2.

Adds a tag to the material.

Parameters:
  • material (MaterialPtr) - The material to add the tag to.
  • tag (string) - The tag string to add.

addMaterialTag(materials, tag)

 

Deprecated: Use vrMetadataService.addTags in API v2.

Adds a tag to the material.

Parameters:
  • materials (list of MaterialPtr) - The materials to add the tag to.
  • tag (string) - The tag string to add.

addMaterialTags(material, tags)

 

Deprecated: Use vrMetadataService.addTags in API v2.

Adds tags to the materials.

Parameters:
  • material (MaterialPtr) - The material to add the tags to.
  • tags (list of strings) - The tags to add.

addMaterialTags(materials, tags)

 

Deprecated: Use vrMetadataService.addTags in API v2.

Adds a tag to the materials.

Parameters:
  • materials (list of MaterialPtr) - The materials to add the tag to.
  • tags (list of strings) - The tags to add.

removeMaterialTag(material, tag)

 

Deprecated: Use vrMetadataService.removeTags in API v2.

Removes a tag from a material.

Parameters:
  • material (MaterialPtr) - The material to remove the tag from.
  • tag (string) - The tag string to remove.

removeMaterialTag(materials, tag)

 

Deprecated: Use vrMetadataService.removeTags in API v2.

Removes a tag from the given materials.

Parameters:
  • materials (List of MaterialPtr) - The materials to remove the tag from.
  • tag (string) - The tag string to remove.

removeMaterialTags(material, tags)

 

Deprecated: Use vrMetadataService.removeTags in API v2.

Removes the tags from a material.

Parameters:
  • material (MaterialPtr) - The material to remove the tags from.
  • tags (list of strings) - The list of tag strings to remove.

removeMaterialTags(materials, tags)

 

Deprecated: Use vrMetadataService.removeTags in API v2.

Removes the tags from the given materials.

Parameters:
  • materials (List of MaterialPtr) - The materials to remove the tag from.
  • tags (list of strings) - The list of tag strings to remove.

replaceMaterialTag(material, oldTag, newTag)

 

Deprecated: Use vrMetadataService.renameTag in API v2.

Replaces an existing tag.

Parameters:
  • material (MaterialPtr) - The material in question.
  • oldTag (string) - The tag string to remove.
  • newTag (string) - The tag string to add instead.

replaceMaterialTag(materials, oldTag, newTag)

 

Deprecated: Use vrMetadataService.renameTag in API v2.

Replaces an existing tag.

Parameters:
  • materials (List of MaterialPtr) - The materials to replace the tags.
  • oldTag (string) - The tag string to remove.
  • newTag (string) - The tag string to add instead.

createMaterial(type)

 

Deprecated: Use vrMaterialService.createMaterial(name, type) in API v2.

Creates a MaterialPtr of a specific type.

Parameters:
  • type (string - names are like 'U'+like in the MaterialEditor without space e.g. 'UPlasticMaterial') - The name of the material type.
Returns: vrMaterialPtr
The material.

findMaterial(name)

 

Deprecated: Use vrMaterialService.findMaterial(name) in API v2.

Finds a material by name.

Parameters:
  • name (string) - The material name.
Returns: vrMaterialPtr
The material.

findMaterials(name, regexp)

 

See vrMaterialService.findMaterials(name) in API v2.

Finds materials by name.

Parameters:
  • name (string) - The material name.
  • regexp (bool) - Use regular expression: On/Off (Optional). Default is false.
Returns: list of vrMaterialPtrs
The materials.

getAllMaterials()

 

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

Returns all materials.

Returns: list of vrMaterialPtrs
The materials.

getMaterialTags(material)

 

Deprecated: Use vrMetadataService.getTags() in API v2.

Returns the list of tags attached to the given material.

Parameters:
  • material (MaterialPtr) - The material to check.

getMaterialsWithTag(tag)

 

Deprecated: Use vrMaterialService.getMaterialsWithAnyTag in API v2.

Returns a list of materials which have the metadatatag assigned starting from the root material.

Parameters:
  • tag (string) - The tag string to check.
Returns: list of vrMaterialPtrs
The selected materials.

getMaterialsWithTags(tags, matchAllTags)

 

Deprecated: Use vrMaterialService.getMaterialsWithAnyTag or vrMaterialService.getMaterialsWithAllTags in API v2.

Returns a list of materials which have the metadatatag assigned.

Parameters:
  • tags (string) - The list of tag strings to check.
  • matchAllTags (bool) - If true only materials which contain all give tags are returns. If false any material that contains at least one tag is returned.
Returns: list of vrMaterialPtrs
The selected materials.

hasMaterialTag(material, tag)

 

Deprecated: Use vrMetadataService.hasTag() in API v2.

Checks if a material has a certain tag.

Parameters:
  • material (MaterialPtr) - The material to check.
  • tag (string) - The tag string to check.

hasMaterialTags(material, tag)

 

Deprecated: Use vrMetadataService.getTags() in API v2.

Checks if a material has a certain tag.

Parameters:
  • material (MaterialPtr) - The material to check.
  • tag (string) - The tag string to check.

setEnvironmentImage(mat, image_path)

 

Deprecated: Use vrImageService.loadImage(image_path, vrImageTypes.LoadType.Environment) and envMat.setEnvironment(img) in API v2.

Changes the image of a material.

Parameters:
  • mat (MaterialPtr) - The material.
  • image_path (string) - The image path.

setMaterialImage(mat, field_name, image_path)

 

Deprecated: Use vrImageService.loadImage(image_path) and e.g. mat.getDiffuseTexture().setImage(img) in API v2.

Changes the image of a material.

Parameters:
  • mat (MaterialPtr or string) - The material pointer or the material name.
  • field_name (string) - The field name.
  • image_path (string) - The image path.

setSwitchMaterialChoice(name, choice)

 

Deprecated: Use vrdSwitchMaterial.setChoice(choice) in API v2.

Changes the choice of a switch material.

Parameters:
  • name (string) - The material name.
  • choice (unsigned integer) - The choice.

setTextureTransform(mat, translate, rotate, scale)

 

Changes the input coordinate transformation for texture projections in ubermaterials.

Parameters:
  • mat (MaterialPtr) - The material. This must be a material derived from Ubermaterial.
  • translate (Pnt3f) - translation values.
  • rotate (Vec3f) - euler rotation values.
  • scale (Vec3f) - scale values.

toMaterial(id)

 

Returns a material pointer corresponding to the material id provided.

Parameters:
  • id (unsigned int (32bit)) - The material id.
Returns: vrMaterialPtr
The material pointer.