MaterialCollection

from panda3d.core import MaterialCollection
class MaterialCollection

Bases: DTOOL_SUPER_BASE

Inheritance diagram

Inheritance diagram of MaterialCollection

__init__(*args, **kwargs)
addMaterial()

C++ Interface: add_material(const MaterialCollection self, Material node_material)

/**
  • Adds a new Material to the collection.

*/

addMaterialsFrom()

C++ Interface: add_materials_from(const MaterialCollection self, const MaterialCollection other)

/**
  • Adds all the Materials indicated in the other collection to this material.

  • The other materials are simply appended to the end of the materials in this

  • list; duplicates are not automatically removed.

*/

add_material()

C++ Interface: add_material(const MaterialCollection self, Material node_material)

/**
  • Adds a new Material to the collection.

*/

add_materials_from()

C++ Interface: add_materials_from(const MaterialCollection self, const MaterialCollection other)

/**
  • Adds all the Materials indicated in the other collection to this material.

  • The other materials are simply appended to the end of the materials in this

  • list; duplicates are not automatically removed.

*/

assign()

C++ Interface: assign(const MaterialCollection self, const MaterialCollection copy)

clear()

C++ Interface: clear(const MaterialCollection self)

/**
  • Removes all Materials from the collection.

*/

findMaterial()

C++ Interface: find_material(MaterialCollection self, str name)

/**
  • Returns the material in the collection with the indicated name, if any, or

  • NULL if no material has that name.

*/

find_material()

C++ Interface: find_material(MaterialCollection self, str name)

/**
  • Returns the material in the collection with the indicated name, if any, or

  • NULL if no material has that name.

*/

getMaterial()

C++ Interface: get_material(MaterialCollection self, int index)

/**
  • Returns the nth Material in the collection.

*/

getNumMaterials()

C++ Interface: get_num_materials(MaterialCollection self)

/**
  • Returns the number of Materials in the collection.

*/

get_material()

C++ Interface: get_material(MaterialCollection self, int index)

/**
  • Returns the nth Material in the collection.

*/

get_num_materials()

C++ Interface: get_num_materials(MaterialCollection self)

/**
  • Returns the number of Materials in the collection.

*/

hasMaterial()

C++ Interface: has_material(MaterialCollection self, Material material)

/**
  • Returns true if the indicated Material appears in this collection, false

  • otherwise.

*/

has_material()

C++ Interface: has_material(MaterialCollection self, Material material)

/**
  • Returns true if the indicated Material appears in this collection, false

  • otherwise.

*/

output()

C++ Interface: output(MaterialCollection self, ostream out)

/**
  • Writes a brief one-line description of the MaterialCollection to the

  • indicated output stream.

*/

removeDuplicateMaterials()

C++ Interface: remove_duplicate_materials(const MaterialCollection self)

/**
  • Removes any duplicate entries of the same Materials on this collection. If

  • a Material appears multiple times, the first appearance is retained;

  • subsequent appearances are removed.

*/

removeMaterial()

C++ Interface: remove_material(const MaterialCollection self, Material node_material)

/**
  • Removes the indicated Material from the collection. Returns true if the

  • material was removed, false if it was not a member of the collection.

*/

removeMaterialsFrom()

C++ Interface: remove_materials_from(const MaterialCollection self, const MaterialCollection other)

/**
  • Removes from this collection all of the Materials listed in the other

  • collection.

*/

remove_duplicate_materials()

C++ Interface: remove_duplicate_materials(const MaterialCollection self)

/**
  • Removes any duplicate entries of the same Materials on this collection. If

  • a Material appears multiple times, the first appearance is retained;

  • subsequent appearances are removed.

*/

remove_material()

C++ Interface: remove_material(const MaterialCollection self, Material node_material)

/**
  • Removes the indicated Material from the collection. Returns true if the

  • material was removed, false if it was not a member of the collection.

*/

remove_materials_from()

C++ Interface: remove_materials_from(const MaterialCollection self, const MaterialCollection other)

/**
  • Removes from this collection all of the Materials listed in the other

  • collection.

*/

write()

C++ Interface: write(MaterialCollection self, ostream out, int indent_level)

/**
  • Writes a complete multi-line description of the MaterialCollection to the

  • indicated output stream.

*/