pymel.core.general.DiscreteComponent¶
digraph inheritancebca26eb4fd { rankdir=TB; ranksep=0.15; nodesep=0.15; size="8.0, 12.0"; "Component" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.general.Component.html#pymel.core.general.Component",style="setlinewidth(0.5)",tooltip="Abstract base class for pymel components.",height=0.25,shape=box,fontsize=8]; "PyNode" -> "Component" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DimensionedComponent" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.general.DimensionedComponent.html#pymel.core.general.DimensionedComponent",style="setlinewidth(0.5)",tooltip="Components for which having a __getitem__ of some sort makes sense",height=0.25,shape=box,fontsize=8]; "Component" -> "DimensionedComponent" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DiscreteComponent" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="#pymel.core.general.DiscreteComponent",style="setlinewidth(0.5)",tooltip="Components whose dimensions are discretely indexed.",height=0.25,shape=box,fontsize=8]; "DimensionedComponent" -> "DiscreteComponent" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ProxyUnicode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="../pymel.util.utilitytypes/pymel.util.utilitytypes.ProxyUnicode.html#pymel.util.utilitytypes.ProxyUnicode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "PyNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.general.PyNode.html#pymel.core.general.PyNode",style="setlinewidth(0.5)",tooltip="Abstract class that is base for all pymel nodes classes.",height=0.25,shape=box,fontsize=8]; "ProxyUnicode" -> "PyNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
- class DiscreteComponent(*args, **kwargs)¶
Components whose dimensions are discretely indexed.
Ie, there are a finite number of possible components, referenced by integer indices.
Example: polyCube.vtx[38], f.cv[3][2]
Derived classes should implement: _dimLength
- VALID_SINGLE_INDEX_TYPES = (<type 'int'>, <type 'long'>, <type 'slice'>, <class 'pymel.core.general.HashableSlice'>)¶
- count()¶
- currentItem()¶
- currentItemIndex()¶
Returns the component indices for the current item in this component group
If the component type has more then one dimension, the return result will be a ComponentIndex object which is a sub-class of tuple; otherwise, it will be a single int.
These values correspond to the indices that you would use when selecting components in mel - ie, vtx[5], cv[3][2]
- getIndex()¶
Returns the current ‘flat list’ index for this group of components - ie, if this component holds the vertices:
[5, 7, 12, 13, 14, 25]then if the ‘flat list’ index is 2, then we are pointing to vertex 12.
- indices()¶
A list of all the indices contained by this component.
- indicesIter()¶
An iterator over all the indices contained by this component, as ComponentIndex objects (which are a subclass of tuple).
- next()¶
- reset()¶
- setIndex(index)¶
- totalSize()¶
The maximum possible number of components
ie, for a polygon cube, the totalSize for verts would be 8, for edges would be 12, and for faces would be 6