pymel.core.nodetypes.PolyToSubdiv¶
digraph inheritanceb7c1237619 { rankdir=TB; ranksep=0.15; nodesep=0.15; size="8.0, 12.0"; "DependNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DependNode.html#pymel.core.nodetypes.DependNode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "PyNode" -> "DependNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PolyToSubdiv" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="#pymel.core.nodetypes.PolyToSubdiv",style="setlinewidth(0.5)",tooltip="class counterpart of mel function `polyToSubdiv`",height=0.25,shape=box,fontsize=8]; "DependNode" -> "PolyToSubdiv" [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/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 PolyToSubdiv(*args, **kwargs)¶
class counterpart of mel function polyToSubdiv
This command converts a polygon and produces a subd surface. The name of the new subdivision surface is returned. If construction history is ON, then the name of the new dependency node is returned as well.
- MAttrClass = Enum( EnumValue('MAttrClass', 1, 'localDynamicAttr'), EnumValue('MAttrClass', 2, 'normalAttr'), EnumValue('MAttrClass', 3, 'extensionAttr'), EnumValue('MAttrClass', 4, 'invalidAttr'))¶
- MdgTimerMetric = Enum( EnumValue('MdgTimerMetric', 0, 'metric_callback'), EnumValue('MdgTimerMetric', 1, 'metric_compute'), EnumValue('MdgTimerMetric', 2, 'metric_dirty'), EnumValue('MdgTimerMetric', 3, 'metric_draw'), EnumValue('MdgTimerMetric', 4, 'metric_fetch'), EnumValue('MdgTimerMetric', 5, 'metric_callbackViaAPI'), EnumValue('MdgTimerMetric', 6, 'metric_callbackNotViaAPI'), EnumValue('MdgTimerMetric', 7, 'metric_computeDuringCallback'), EnumValue('MdgTimerMetric', 8, 'metric_computeNotDuringCallback'), EnumValue('MdgTimerMetric', 9, 'metrics'))¶
- MdgTimerState = Enum( EnumValue('MdgTimerState', 0, 'off'), EnumValue('MdgTimerState', 1, 'on'), EnumValue('MdgTimerState', 2, 'uninitialized'), EnumValue('MdgTimerState', 3, 'invalidState'))¶
- MdgTimerType = Enum( EnumValue('MdgTimerType', 0, 'type_self'), EnumValue('MdgTimerType', 1, 'type_inclusive'), EnumValue('MdgTimerType', 2, 'type_count'), EnumValue('MdgTimerType', 3, 'types'))¶
- addAttribute(attr)¶
Add a new dynamic attibute to this node.
Parameters: - attr : PyNode
new attribute
Derived from api method maya.OpenMaya.MFnDependencyNode.addAttribute
Undo is not currently supported for this method
- classmethod allocateFlag(pluginName)¶
Allocates a node flag for sole use by the caller. Note that the flag is not specific to any one node but is made available to the caller on all nodes. Furthermore, node flags only persist for the duration of the current Maya session: they are not saved with the scene.
Parameters: - pluginName : unicode
The name of the plugin which is allocating the flag. A plugin’s name can be retrieved by calling MFnPlugin::name() within its initializePlugin() or uninitializePlugin() functions.
Return type: int
Derived from api method maya.OpenMaya.MFnDependencyNode.allocateFlag
- attribute(index)¶
Finds the attribute of this node at the given index. Index order is based on the order in which the attributes were added to the node.
Parameters: - index : int
the index of the attribute
Return type: PyNode
Derived from api method maya.OpenMaya.MFnDependencyNode.attribute
- attributeClass(attribute)¶
Returns the class (normal, dynamic, extension) of the specified attribute.
Parameters: - attribute : PyNode
the attribute to check
Return type: Derived from api method maya.OpenMaya.MFnDependencyNode.attributeClass
- classmethod deallocateAllFlags(pluginName)¶
Deallocates all of the node flags which are currently allocated to the specified plugin. The deallocated flags immediately become available for use by any plugin.
Parameters: - pluginName : unicode
The name of the plugin whose flags are to be deallocated. A plugin’s name can be retrieved by calling MFnPlugin::name() within its initializePlugin() or uninitializePlugin() functions.
Derived from api method maya.OpenMaya.MFnDependencyNode.deallocateAllFlags
Undo is not currently supported for this method
- classmethod deallocateFlag(pluginName, flag)¶
Deallocates a node flag which was previously allocated by a call to allocateFlag . The flag subsequently becomes available for reallocation and use by someone else.
Parameters: - pluginName : unicode
The name of the plugin which allocated the flag. A plugin’s name can be retrieved by calling MFnPlugin::name() within its initializePlugin() or uninitializePlugin() functions.
- flag : int
Flag to deallocate.
Derived from api method maya.OpenMaya.MFnDependencyNode.deallocateFlag
Undo is not currently supported for this method
- dgCallbacks(timerType, callbackName, value)¶
Node callbacks that occur when timing is enabled get logged with the node and can be queried via this method. See the dgCallbackIds method for getting a further breakdown of the time for an individual callback on this node.
Parameters: - timerType : DependNode.MdgTimerType
The timer we want to query, e.g. kTimerType_self for self time.
values: ‘type_self’, ‘type_inclusive’, ‘type_count’, ‘types’
- callbackName : list list
Returns an array of callback names that were invoked for this node since the last timer reset.
- value : float list
Returns an array of timing values. There is a one-to-one correspondence with the `callbackName’ array.
Derived from api method maya.OpenMaya.MFnDependencyNode.dgCallbacks
Undo is not currently supported for this method
- dgTimer(timerMetric, timerType)¶
The function returns the specified timer value for the current node. This is the total amount of time spent performing the requested operation since the timer was last reset (see dgTimerReset() for details). There are numerous timers per node and these are referenced by the metric and the timer type.
Parameters: - timerMetric : DependNode.MdgTimerMetric
The timing metric we wish to query.
values: ‘metric_callback’, ‘metric_compute’, ‘metric_dirty’, ‘metric_draw’, ‘metric_fetch’, ‘metric_callbackViaAPI’, ‘metric_callbackNotViaAPI’, ‘metric_computeDuringCallback’, ‘metric_computeNotDuringCallback’, ‘metrics’
- timerType : DependNode.MdgTimerType
The timer type we wish to query.
values: ‘type_self’, ‘type_inclusive’, ‘type_count’, ‘types’
Return type: float
Derived from api method maya.OpenMaya.MFnDependencyNode.dgTimer
- dgTimerOff()¶
Indicates that this node should no longer collect DG timing data when DG timing is enabled. See dgTimerOn() and enableDGTiming() for more details. Derived from api method maya.OpenMaya.MFnDependencyNode.dgTimerOff
Undo is not currently supported for this method
- dgTimerOn()¶
Indicates that this node should collect DG timing data whenever DG timing is enabled. See enableDGTiming() for more details. Derived from api method maya.OpenMaya.MFnDependencyNode.dgTimerOn
Undo is not currently supported for this method
- dgTimerQueryState()¶
The function returns the current on/off state of the node’s timer.
Return type: DependNode.MdgTimerState Derived from api method maya.OpenMaya.MFnDependencyNode.dgTimerQueryState
- dgTimerReset()¶
The function resets the dependency graph timers and counters for this node to zero. Note that this method does not start or stop timing, it only resets the values to zero. If you want to turn on timing, use the method dgTimerOn() . If you want to turn off timing, use dgTimerOff() . Derived from api method maya.OpenMaya.MFnDependencyNode.dgTimerReset
Undo is not currently supported for this method
- findAlias(alias)¶
Retrieves the attribute with the given alias.
Parameters: - alias : unicode
alternative name of the attribute
Return type: (bool, PyNode)
Derived from api method maya.OpenMaya.MFnDependencyNode.findAlias
- findPlug(attr, wantNetworkedPlug)¶
Attempt to find a plug for the given attribute. This method will first try to find the networked version of the plug if requested. The networked version of a plug is one that currently exists in the dependency graph at a particular connection point. If a networked version is not found, then a standard non-networked plug is returned.
Parameters: - attr : PyNode
attribute whose plug we wish to find
- wantNetworkedPlug : bool
if true, request a networked plug if it is available
Return type: PyNode
Derived from api method maya.OpenMaya.MFnDependencyNode.findPlug
- getAbsolutePosition(**kwargs)¶
If true, the possible blind data information that comes from the polygon will be treated as absolute positions of the vertices, instead of the relative offsets. You most likelly just want to use the default of false, unless you know that the blind data has the absolute positions in it. Default:false
Derived from mel command maya.cmds.polyToSubdiv
- getAffectedAttributes(attr)¶
Returns an array of attributes that are affected by the attribute passed in. That is, when the given attribute, attr is marked dirty (changed) all the affectedAttributes attributes will also be marked dirty. For nodes defined in plug-ins this call returns all those attributes that were marked as being affected by the given one via the MPxNode::attributeAffects call.
Parameters: - attr : PyNode
the attribute to check
Return type: PyNode list
Derived from api method maya.OpenMaya.MFnDependencyNode.getAffectedAttributes
- getAffectedByAttributes(attr)¶
Returns an array of attributes that affect the attribute passed in, attr . That is, when one of the attributes in affectedByAttributes is marked dirty (changed) then attr will also be marked dirty. For nodes defined in plug-ins this call returns all those attributes that were marked as affecting the given one via the MPxNode::attributeAffects call.
Parameters: - attr : PyNode
the attribute to check
Return type: PyNode list
Derived from api method maya.OpenMaya.MFnDependencyNode.getAffectedByAttributes
- getAliasAttr(force)¶
Returns the node’s alias attribute, which is a special attribute used to store information about the node’s attribute aliases.
Parameters: - force : bool
To indicate whether the alias attr should be created.
Return type: PyNode
Derived from api method maya.OpenMaya.MFnDependencyNode.getAliasAttr
- getAliasList()¶
Returns a list of all attribute aliases for this node. The aliases are pairs of strings with the first being the alias and the second being the attribute’s real name.
Return type: (bool, list list) Derived from api method maya.OpenMaya.MFnDependencyNode.getAliasList
- getApplyMatrixToResult(**kwargs)¶
If true, the matrix on the input geometry is applied to the object and the resulting geometry will have identity matrix on it. If false the conversion is done on the local space object and the resulting geometry has the input object’s matrix on it. Default:true
Derived from mel command maya.cmds.polyToSubdiv
- getCaching(**kwargs)¶
Toggle caching for all attributes so that no recomputation is needed
Derived from mel command maya.cmds.polyToSubdiv
- getConnections()¶
Get all of the current connections to this node as an array of plugs.
Return type: PyNode list Derived from api method maya.OpenMaya.MFnDependencyNode.getConnections
- getMaxEdgesPerVert(**kwargs)¶
The maximum allowed valence for a vertex on the input mesh Default:32
Derived from mel command maya.cmds.polyToSubdiv
- getMaxPolyCount(**kwargs)¶
The maximum number of polygons accepted on the input mesh. Default:1000
Derived from mel command maya.cmds.polyToSubdiv
- getName()¶
Returns the name of this node. Note that if the object the instance of this class is attached to is data instead of being in the graph (ie. the object was created by one of the MFn*Data function sets, or was passed to an MPxNode::compute function in a data block) then the name method will not work.
Return type: unicode Derived from api method maya.OpenMaya.MFnDependencyNode.name
- getNodeState(**kwargs)¶
Maya dependency nodes have 6 possible states. The Normal (0), HasNoEffect (1), and Blocking (2)states can be used to alter how the graph is evaluated. The Waiting-Normal (3), Waiting-HasNoEffect (4), Waiting-Blocking (5)are for internal use only. They temporarily shut off parts of the graph during interaction (e.g., manipulation). The understanding is that once the operation is done, the state will be reset appropriately, e.g. Waiting-Blockingwill reset back to Blocking. The Normaland Blockingcases apply to all nodes, while HasNoEffectis node specific; many nodes do not support this option. Plug-ins store state in the MPxNode::stateattribute. Anyone can set it or check this attribute. Additional details about each of these 3 states follow. StateDescriptionNormalThe normal node state. This is the default.HasNoEffectThe HasNoEffectoption (a.k.a. pass-through), is used in cases where there is an operation on an input producing an output of the same data type. Nearly all deformers support this state, as do a few other nodes. As stated earlier, it is not supported by all nodes. Its typical to implement support for the HasNoEffectstate in the nodes compute method and to perform appropriate operations. Plug-ins can also support HasNoEffect. The usual implementation of this state is to copy the input directly to the matching output without applying the algorithm in the node. For deformers, applying this state leaves the input geometry undeformed on the output. BlockingThis is implemented in the depend node base class and applies to all nodes. Blockingis applied during the evaluation phase to connections. An evaluation request to a blocked connection will return as failures, causing the destination plug to retain its current value. Dirty propagation is indirectly affected by this state since blocked connections are never cleaned. When a node is set to Blockingthe behavior is supposed to be the same as if all outgoing connections were broken. As long as nobody requests evaluation of the blocked node directly it wont evaluate after that. Note that a blocked node will still respond to getAttrrequests but a getAttron a downstream node will not reevaluate the blocked node. Setting the root transform of a hierarchy to Blockingwont automatically influence child transforms in the hierarchy. To do this, youd need to explicitly set all child nodes to the Blockingstate. For example, to set all child transforms to Blocking, you could use the following script. import maya.cmds as cmds def blockTree(root): nodesToBlock = [] for node in {child:1 for child in cmds.listRelatives( root, path=True, allDescendents=True )}.keys(): nodesToBlock += cmds.listConnections(node, source=True, destination=True ) for node in {source:1 for source in nodesToBlock}.keys(): cmds.setAttr( ‘%s.nodeState’ % node, 2 ) Applying this script would continue to draw objects but things would not be animated. Default:kdnNormal
Derived from mel command maya.cmds.polyToSubdiv
- getPreserveVertexOrdering(**kwargs)¶
Preserve vertex ordering in conversion Default:true
Derived from mel command maya.cmds.polyToSubdiv
- getQuickConvert(**kwargs)¶
Debug flag to test the performance Default:true
Derived from mel command maya.cmds.polyToSubdiv
- getUvPoints(**kwargs)¶
This is a cached uv point needed to transfer uv data associated with finer level vertices (when switching between standard editing mode and poly proxy mode.
Derived from mel command maya.cmds.polyToSubdiv
- getUvPointsU(**kwargs)¶
U value of a cached uv point
Derived from mel command maya.cmds.polyToSubdiv
- getUvPointsV(**kwargs)¶
V value of a cached uv point
Derived from mel command maya.cmds.polyToSubdiv
- getUvTreatment(**kwargs)¶
Treatment of Subd UVs when in proxy mode: 0 - preserve Subd UVs1 - build Subd UVs from Poly UVs2 - no UVs on SubdDefault:0 Common flags
Derived from mel command maya.cmds.polyToSubdiv
- hasAttribute(attrName)¶
Returns true if the node already has an attribute with the given name.
Parameters: - attrName : unicode
Name of attribute to be checked.
Return type: bool
Derived from api method maya.OpenMaya.MFnDependencyNode.hasAttribute
- hasUniqueName()¶
Indicates whether or not this node’s name is unique within the scene.
Return type: bool Derived from api method maya.OpenMaya.MFnDependencyNode.hasUniqueName
- isFromReferencedFile()¶
Indicates whether or not this node came from a referenced file. If it did, the node will be marked as read-only in the scene and changes to the node’s attributes will be saved in the main scene file, not the referenced file from which the node came.
Return type: bool Derived from api method maya.OpenMaya.MFnDependencyNode.isFromReferencedFile
- isNewAttribute(attr)¶
Indicates whether or not the specified attribute was added to this node within the current scene.
Parameters: - attr : PyNode
Attribute to check.
Return type: bool
Derived from api method maya.OpenMaya.MFnDependencyNode.isNewAttribute
- plugsAlias(plug)¶
Returns the alias for the plug’s attribute or the empty string if that attribute has no alias.
Parameters: - plug : PyNode
plug for whose attribute we want the alias
Return type: unicode
Derived from api method maya.OpenMaya.MFnDependencyNode.plugsAlias
- removeAttribute(attribute)¶
Remove a dynamic attribute from a node.
Parameters: - attribute : PyNode
attribute to remove
Derived from api method maya.OpenMaya.MFnDependencyNode.removeAttribute
Undo is not currently supported for this method
- reorderedAttribute(index)¶
Some nodes, such as the various animCurve nodes, require that their attributes be set in a specific order for proper operation. Usually this ordering is only important when the node is being created during file I/O.
Parameters: - index : int
the reordered index of the attribute
Return type: PyNode
Derived from api method maya.OpenMaya.MFnDependencyNode.reorderedAttribute
- setAbsolutePosition(val=True, **kwargs)¶
If true, the possible blind data information that comes from the polygon will be treated as absolute positions of the vertices, instead of the relative offsets. You most likelly just want to use the default of false, unless you know that the blind data has the absolute positions in it. Default:false
Derived from mel command maya.cmds.polyToSubdiv
- setAlias(alias, name, plug, add=True)¶
Sets or removes an alias (i.e. an alternative name) for an attribute.
Parameters: - alias : unicode
alternative name for the attribute
- name : unicode
real name of the attribute
- plug : PyNode
plug to the attribute
- add : bool
true to add the alias, false to remove it
Return type: bool
Derived from api method maya.OpenMaya.MFnDependencyNode.setAlias
- setApplyMatrixToResult(val=True, **kwargs)¶
If true, the matrix on the input geometry is applied to the object and the resulting geometry will have identity matrix on it. If false the conversion is done on the local space object and the resulting geometry has the input object’s matrix on it. Default:true
Derived from mel command maya.cmds.polyToSubdiv
- setCaching(val=True, **kwargs)¶
Toggle caching for all attributes so that no recomputation is needed
Derived from mel command maya.cmds.polyToSubdiv
- setFlag(flag, state)¶
Sets the state of the specified flag for the node.
Parameters: - flag : int
flag to set
- state : bool
new state to which the flag will be set
Derived from api method maya.OpenMaya.MFnDependencyNode.setFlag
Undo is not currently supported for this method
- setMaxEdgesPerVert(val=True, **kwargs)¶
The maximum allowed valence for a vertex on the input mesh Default:32
Derived from mel command maya.cmds.polyToSubdiv
- setMaxPolyCount(val=True, **kwargs)¶
The maximum number of polygons accepted on the input mesh. Default:1000
Derived from mel command maya.cmds.polyToSubdiv
- setName(name, createNamespace=False)¶
Sets the name of this node.
Parameters: - name : unicode
the new name for the node
- createNamespace : bool
determine whether or not to create a new namespace when the given name includes a namespace which does not exist.
Return type: unicode
Derived from api method maya.OpenMaya.MFnDependencyNode.setName
- setNodeState(val=True, **kwargs)¶
Maya dependency nodes have 6 possible states. The Normal (0), HasNoEffect (1), and Blocking (2)states can be used to alter how the graph is evaluated. The Waiting-Normal (3), Waiting-HasNoEffect (4), Waiting-Blocking (5)are for internal use only. They temporarily shut off parts of the graph during interaction (e.g., manipulation). The understanding is that once the operation is done, the state will be reset appropriately, e.g. Waiting-Blockingwill reset back to Blocking. The Normaland Blockingcases apply to all nodes, while HasNoEffectis node specific; many nodes do not support this option. Plug-ins store state in the MPxNode::stateattribute. Anyone can set it or check this attribute. Additional details about each of these 3 states follow. StateDescriptionNormalThe normal node state. This is the default.HasNoEffectThe HasNoEffectoption (a.k.a. pass-through), is used in cases where there is an operation on an input producing an output of the same data type. Nearly all deformers support this state, as do a few other nodes. As stated earlier, it is not supported by all nodes. Its typical to implement support for the HasNoEffectstate in the nodes compute method and to perform appropriate operations. Plug-ins can also support HasNoEffect. The usual implementation of this state is to copy the input directly to the matching output without applying the algorithm in the node. For deformers, applying this state leaves the input geometry undeformed on the output. BlockingThis is implemented in the depend node base class and applies to all nodes. Blockingis applied during the evaluation phase to connections. An evaluation request to a blocked connection will return as failures, causing the destination plug to retain its current value. Dirty propagation is indirectly affected by this state since blocked connections are never cleaned. When a node is set to Blockingthe behavior is supposed to be the same as if all outgoing connections were broken. As long as nobody requests evaluation of the blocked node directly it wont evaluate after that. Note that a blocked node will still respond to getAttrrequests but a getAttron a downstream node will not reevaluate the blocked node. Setting the root transform of a hierarchy to Blockingwont automatically influence child transforms in the hierarchy. To do this, youd need to explicitly set all child nodes to the Blockingstate. For example, to set all child transforms to Blocking, you could use the following script. import maya.cmds as cmds def blockTree(root): nodesToBlock = [] for node in {child:1 for child in cmds.listRelatives( root, path=True, allDescendents=True )}.keys(): nodesToBlock += cmds.listConnections(node, source=True, destination=True ) for node in {source:1 for source in nodesToBlock}.keys(): cmds.setAttr( ‘%s.nodeState’ % node, 2 ) Applying this script would continue to draw objects but things would not be animated. Default:kdnNormal
Derived from mel command maya.cmds.polyToSubdiv
- setPreserveVertexOrdering(val=True, **kwargs)¶
Preserve vertex ordering in conversion Default:true
Derived from mel command maya.cmds.polyToSubdiv
- setQuickConvert(val=True, **kwargs)¶
Debug flag to test the performance Default:true
Derived from mel command maya.cmds.polyToSubdiv
- setUvPoints(val=True, **kwargs)¶
This is a cached uv point needed to transfer uv data associated with finer level vertices (when switching between standard editing mode and poly proxy mode.
Derived from mel command maya.cmds.polyToSubdiv
- setUvPointsU(val=True, **kwargs)¶
U value of a cached uv point
Derived from mel command maya.cmds.polyToSubdiv
- setUvPointsV(val=True, **kwargs)¶
V value of a cached uv point
Derived from mel command maya.cmds.polyToSubdiv
- setUvTreatment(val=True, **kwargs)¶
Treatment of Subd UVs when in proxy mode: 0 - preserve Subd UVs1 - build Subd UVs from Poly UVs2 - no UVs on SubdDefault:0 Common flags
Derived from mel command maya.cmds.polyToSubdiv
- typeName()¶
Returns the type name of this node. The string returned is the name of the node type as it is used in the ascii file format.
Return type: unicode Derived from api method maya.OpenMaya.MFnDependencyNode.typeName