Package empro :: Module empro :: Class MaterialList
[frames] | no frames]

Class MaterialList

core.Updatable --+    
                 |    
   core.Selectable --+
                     |
                    MaterialList

Manages the list of materials.

Class Hierarchy for MaterialList
Class Hierarchy for MaterialList

Instance Methods
 
__call__(x, ...)
x(...)
 
__contains__(x, y)
y in x
 
__delitem__(x, y)
del x[y]
 
__getitem__(x, y)
x[y]
 
__len__(x)
len(x)
 
__setitem__(x, i, y)
x[i]=y
bool
append(iMaterial)
Appends a material to the list.
Material
at(iName)
Returns the material by name.
None
clear()
Clear the list.
bool
contains(iMaterial)
Determines if the material is in the list.
int
index(iMaterial)
Retrieves the index of a material.
list{string}
names()
Returns the names of the materials in the list.
bool
remove(iIndex)
Removes a material.
int
size()
Returns the size of the list.
None
swap(iIndex, iIndex)
Swaps two materials.

Inherited from core.Selectable: clone, isSelected

Inherited from core.Updatable: __enter__, __exit__, hash, isValid, reasonWhyInvalid

Properties

Inherited from core.Selectable: metaData, name, notes

Method Details

append(iMaterial)

 

Appends a material to the list.

Parameters:
  • iMaterial (Material) - Material to add.
Returns: bool

at(iName)

 

Returns the material by name.

Parameters:
  • iName (string) - Name of the requested material.
Returns: Material

contains(iMaterial)

 

Determines if the material is in the list.

Parameters:
  • iMaterial (Material) - Material to query.
Returns: bool

index(iMaterial)

 

Retrieves the index of a material.

Parameters:
  • iMaterial (Material) - Material to query.
Returns: int

remove(iIndex)

 

Removes a material.

Parameters:
  • iIndex (int) - Index of the material to remove.
Returns: bool

swap(iIndex, iIndex)

 

Swaps two materials.

Parameters:
  • iIndex (int) - Index of the first material.
  • iIndex (int) - Index of the second material.
Returns: None