Python API 2.0 Reference
OpenMayaUI.MMaterialArray Class Reference
+ Inheritance diagram for OpenMayaUI.MMaterialArray:

Public Member Functions

def __getitem__ ()
 
def __init__ ()
 
def __len__ ()
 
def append ()
 
def clear ()
 
def copy ()
 
def insert ()
 
def remove ()
 
def set ()
 
def setLength ()
 

Static Public Member Functions

def __new__ ()
 

Properties

 sizeIncrement = property(...)
 

Detailed Description

An array of MMaterial.

Constructor & Destructor Documentation

def OpenMayaUI.MMaterialArray.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMayaUI.MMaterialArray.__getitem__ ( )
Return self[key].
def OpenMayaUI.MMaterialArray.__len__ ( )
Return len(self).
def OpenMayaUI.MMaterialArray.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaUI.MMaterialArray.append ( )
append(element) -> self

Adds a new element to the end of the array.

* element (MMaterial) - the value for the new last element.
def OpenMayaUI.MMaterialArray.clear ( )
clear() -> self

Clear the contents of the array. After this operation the length will be 0.  This does not change the amount of memory allocated to the array, only the number of valid elements in it.
def OpenMayaUI.MMaterialArray.copy ( )
copy(source) -> self

Copy the contents of the source array to this array.

* source (MMaterialArray) - array to copy from.
def OpenMayaUI.MMaterialArray.insert ( )
insert(element, index) -> self

Inserts a new value into the array at the given index. The initial element at that index, and all following elements, are shifted towards the last.

* element (MMaterial) - the new value to insert into the array.
* index (int) - the index of the element to set.
def OpenMayaUI.MMaterialArray.remove ( )
remove(index) -> self

Removes the element in the array at the given index.

* index (int) - the index of the element to remove.
def OpenMayaUI.MMaterialArray.set ( )
set(element, index) -> self

Sets the value of the specified element to the given attribute spec.

* element (MMaterial) - the new value for the specified element.
* index (int) - the index of the element to be set.
def OpenMayaUI.MMaterialArray.setLength ( )
setLength(length) -> self

Set the length of the array. This will grow and shrink the array as desired. Elements that are grown have uninitialized values, while those which are shrunk will lose the data contained in the deleted elements

* length (int) - the new size of the array.

Property Documentation

OpenMayaUI.MMaterialArray.sizeIncrement = property(...)
static
 The size by which the array will be expanded whenever expansion is necessary.