MaterialCollection¶
from acron.core import MaterialCollection
- class MaterialCollection¶
Bases:
Inheritance diagram
digraph inheritance277653cb4d { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "MaterialCollection" [URL="acron.core.MaterialCollection.html#acron.core.MaterialCollection",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "MaterialCollection" [arrowsize=0.75,style=""]; }- __add__()¶
- __getitem__()¶
Returns the nth Material in the collection. This is the same as
get_material(), but it may be a more convenient way to access it.
- __iadd__()¶
- __init__()¶
- add_material()¶
Adds a new Material to the collection.
- add_materials_from()¶
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()¶
- clear()¶
Removes all Materials from the collection.
- find_material()¶
Returns the material in the collection with the indicated name, if any, or NULL if no material has that name.
- get_material()¶
Returns the nth Material in the collection.
- get_num_materials()¶
Returns the number of Materials in the collection.
- has_material()¶
Returns true if the indicated Material appears in this collection, false otherwise.
- output()¶
Writes a brief one-line description of the
MaterialCollectionto the indicated output stream.
- remove_duplicate_materials()¶
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()¶
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()¶
Removes from this collection all of the Materials listed in the other collection.
- size()¶
Returns the number of materials in the collection. This is the same thing as
get_num_materials().
- write()¶
Writes a complete multi-line description of the
MaterialCollectionto the indicated output stream.