pymel.core.nodetypes.Subdiv¶
digraph inheritanced40555ac89 { rankdir=TB; ranksep=0.15; nodesep=0.15; size="8.0, 12.0"; "ContainerBase" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.ContainerBase.html#pymel.core.nodetypes.ContainerBase",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "DependNode" -> "ContainerBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ControlPoint" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.ControlPoint.html#pymel.core.nodetypes.ControlPoint",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "DeformableShape" -> "ControlPoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DagNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DagNode.html#pymel.core.nodetypes.DagNode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "Entity" -> "DagNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DeformableShape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DeformableShape.html#pymel.core.nodetypes.DeformableShape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "GeometryShape" -> "DeformableShape" [arrowsize=0.5,style="setlinewidth(0.5)"]; "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)"]; "Entity" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.Entity.html#pymel.core.nodetypes.Entity",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "ContainerBase" -> "Entity" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GeometryShape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.GeometryShape.html#pymel.core.nodetypes.GeometryShape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "Shape" -> "GeometryShape" [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)"]; "Shape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.Shape.html#pymel.core.nodetypes.Shape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "DagNode" -> "Shape" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Subdiv" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="#pymel.core.nodetypes.Subdiv",style="setlinewidth(0.5)",tooltip="class counterpart of mel function `subdiv`",height=0.25,shape=box,fontsize=8]; "SurfaceShape" -> "Subdiv" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SurfaceShape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.SurfaceShape.html#pymel.core.nodetypes.SurfaceShape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "ControlPoint" -> "SurfaceShape" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
- class Subdiv(*args, **kwargs)¶
class counterpart of mel function subdiv
Provides useful information about the selected subdiv or components, such as the deepest subdivided level, the children or parents of the currently selected components, etc. In query mode, return type is based on queried flag.
- cleanTopology()¶
- collapse(level, makeNewNodeInvisible)¶
This method creates a copy of a given source subdivision surface collapsed by the given number of levels. After the collapse this function set will operate on the new subdivision surface.
Parameters: - level : int
the number of levels of the hierarchy to collapse
- makeNewNodeInvisible : bool
sets the invisible attribute of the new node
Return type: PyNode
Derived from api method maya.OpenMaya.MFnSubd.collapse
- convertToNurbs()¶
Converts this surface to a set of nurbs surfaces.
Return type: PyNode list Derived from api method maya.OpenMaya.MFnSubd.convertToNurbs
- copy(source, parentOrOwner='MObject::kNullObj')¶
This method creates a copy of a given source subdivision surface. After the copy this function set will operate on the new subdivision surface.
Parameters: - source : PyNode
the subdivision surface to be copied
- parentOrOwner : PyNode
the DAG parent or kSubdivData the new subdivision surface will belong to
Return type: PyNode
Derived from api method maya.OpenMaya.MFnSubd.copy
- creasesClearAll()¶
Clear all crease information from this surface. No vertices or edges will be creased after this function completes. Derived from api method maya.OpenMaya.MFnSubd.creasesClearAll
Undo is not currently supported for this method
- createBaseMesh(reverseNormal, numVertices, numPolygons, vertexArray, polygonCounts, polygonConnects, parentOrOwner='MObject::kNullObj')¶
Creates a new subdivision surface given an array of vertices and connection information and sets this function set to operate on the new surface.
Parameters: - reverseNormal : bool
Not currently used
- numVertices : int
number of vertices
- numPolygons : int
number of polygons
- vertexArray : Point list
point (vertex) array
- polygonCounts : int list
array of vertex counts for each polygon
- polygonConnects : int list
array of vertex connections for each polygon
- parentOrOwner : PyNode
parent of the polygon that will be created
Return type: PyNode
Derived from api method maya.OpenMaya.MFnSubd.createBaseMesh
- editsPending()¶
As the new hierarchical vertex offsets are being introduced, you can choose to not apply them to the surface immediatelly. If you do that, the number of edits pending will increase. Any edits are not actually made until you call “updateEdits”. This functions lets you know if you need to call it or not.
Return type: int Derived from api method maya.OpenMaya.MFnSubd.editsPending
- editsUpdateAll()¶
If there are pending edits, this function will update the surface so that there are no pending edits. Derived from api method maya.OpenMaya.MFnSubd.editsUpdateAll
Undo is not currently supported for this method
- getCurrentLevel(**kwargs)¶
When queried, this flag returns an integer representing the level of the currently selected subdiv surface component(s). Returns -1, if there are more than one level of CVs are selected, (even if they are from different objects) Returns -2, if there are no input subdiv CVs to process.
Derived from mel command maya.cmds.subdiv
- getCurrentSubdLevel(**kwargs)¶
When queried, this flag returns an integer representing the level of the currently selected subdiv surface, regardless of whether components are selected or not. Returns -2, if there are no input subdiv CVs to process.
Derived from mel command maya.cmds.subdiv
- getDeepestLevel(**kwargs)¶
When queried, this flag returns an integer representing the deepest level to which the queried subdiv surface has been subdivided.
Derived from mel command maya.cmds.subdiv
- getDisplayLoad(**kwargs)¶
When queried, this flag prints the display load of selected subdiv
Derived from mel command maya.cmds.subdiv
- getEdgeStats(**kwargs)¶
When queried, this flag prints stats on the current subd.
Derived from mel command maya.cmds.subdiv
- getEdges(**kwargs)¶
- getFaceStats(**kwargs)¶
When queried, this flag prints stats on the current subd.
Derived from mel command maya.cmds.subdiv
- getMaxPossibleLevel(**kwargs)¶
When queried, this flag returns an integer representing the maximum possible level to which the queried subdiv surface can been subdivided.
Derived from mel command maya.cmds.subdiv
- getProxyMode(**kwargs)¶
When queried, this flag returns an integer representing whether or not the subdivision surface is in polygon proxymode. Proxymode allows the base mesh of a subdivision surface without construction history to be edited using the polygonal editing tools. Returns 1, if the subdivision surface is in polygon proxymode. Returns 0, if the surface is not currently in proxymode, but could be put into proxymode since it has no construction history. (This state is also known as standardmode.) Returns 2, if the surface is not in proxymode and cannot be put into proxy mode, as it has construction history.
Derived from mel command maya.cmds.subdiv
- getSharpenedEdges(**kwargs)¶
- getSharpenedVerts(**kwargs)¶
- getSmallOffsets(**kwargs)¶
When queried, this flag prints the number of subdiv vertices in the hierarchy that have a small enough offset so that the vertex is not required Flag can have multiple arguments, passed either as a tuple or a list.
Derived from mel command maya.cmds.subdiv
- getTweakedVerts(**kwargs)¶
- levelFullySubdivideTo(level)¶
Fully subdivide the whole surface to the specified level. This could be very expensive, so be careful, or you will run out of memory. As a rule, each level has 4 times more faces than the previous one.
Parameters: - level : int
The level to which to fully subdivide
Derived from api method maya.OpenMaya.MFnSubd.levelFullySubdivideTo
Undo is not currently supported for this method
- levelMaxAllowed()¶
Returns the maximum level that can be created. You should probably avoid fully subdividing the surface to that level as you will most likelly just run out of memory.
Return type: int Derived from api method maya.OpenMaya.MFnSubd.levelMaxAllowed
- levelMaxCurrent()¶
Returns the finest level that currently exist. As int as a single face exists at a level, that level is counted. Note that this not mean that all of the faces exist on all levels.
Return type: int Derived from api method maya.OpenMaya.MFnSubd.levelMaxCurrent
- numEdges(level=0)¶
Returns the number of edges at a level.
Parameters: - level : int
The level where we’re counting the edges
Return type: int
Derived from api method maya.OpenMaya.MFnSubd.edgeCount
- numFaces(level=0)¶
Returns the number of polygons currently existing at the specified level of the hierarchy.
Parameters: - level : int
Level at which we’re counting
Return type: int
Derived from api method maya.OpenMaya.MFnSubd.polygonCount
- numVertices(level=0)¶
Returns the finest vertex count at a particular level. These are the vertices that are currently instantiated.
Parameters: - level : int
The level we are interested in
Return type: int
Derived from api method maya.OpenMaya.MFnSubd.vertexCount
- polygonCountMaxWithGivenBaseMesh(level=1)¶
If you were to fully subdivide at a given level, how many polygons would you have at that level? This function will tell you and possibly save you from running out of memory if you go too deep. Note that this is exactly the same as “polygonCount” for levels 0 and 1.
Parameters: - level : int
The level where you would be counting
Return type: int
Derived from api method maya.OpenMaya.MFnSubd.polygonCountMaxWithGivenBaseMesh
- tesselate(uniform, depth, sample, parentOrOwner='MObject::kNullObj')¶
Performs tesselation on this surface and create a new mesh in the DAG. The parentOrOwner argument is used to specify the owner of the new surface.
Parameters: - uniform : bool
Use uniform tesselation if this is set.
- depth : int
Used in the uniform tesselation: how deep do we go
- sample : int
In both tesselation cases, once we decide which level to tesselate at, how many times do we sample.
- parentOrOwner : PyNode
the DAG parent or kMeshData the new Mesh will belong to
Return type: PyNode
Derived from api method maya.OpenMaya.MFnSubd.tesselate
- tessellateViaNurbs(parentOrOwner='MObject::kNullObj')¶
Performs tesselation on this surface and create a new mesh in the DAG. The parentOrOwner argument is used to specify the owner of the new surface.
Parameters: - parentOrOwner : PyNode
the DAG parent or kMeshData the new Mesh will belong to
Return type: PyNode
Derived from api method maya.OpenMaya.MFnSubd.tessellateViaNurbs
- updateAllEditsAndCreases()¶
If you have been editing offsets without updating the surface, this function will save you. This will dirty up the complete surface and recompute the positions of all the cvs, updating the crease info along the way. Not cheap to call. Derived from api method maya.OpenMaya.MFnSubd.updateAllEditsAndCreases
Undo is not currently supported for this method
- updateSubdSurface()¶
Signal that this subdivision surface has changed and needs to redraw itself. Derived from api method maya.OpenMaya.MFnSubd.updateSubdSurface
Undo is not currently supported for this method
- vertexBaseMeshAdd(x, y, z)¶
Add a vertex to the base mesh and return its “index” name. Note that it will not have a valid 64-bit name until you actually create a polygon that holds it.
Parameters: - x : float
X location of the vertex
- y : float
Y location of the vertex
- z : float
Z location of the vertex
Return type: int
Derived from api method maya.OpenMaya.MFnSubd.vertexBaseMeshAdd
- vertexBaseMeshAddWithIndex(x, y, z, index)¶
Very similar to vertexBaseMeshAdd, this gives you an advanced option of specifying the index for the new vertex to be created. You have to be extremelly careful to end up with the indices 0, 1, ... N-1 for N total vertices.
Parameters: - x : float
X location of the vertex
- y : float
Y location of the vertex
- z : float
Z location of the vertex
- index : int
The index the vertex is to take
Derived from api method maya.OpenMaya.MFnSubd.vertexBaseMeshAddWithIndex
Undo is not currently supported for this method
- vertexBaseMeshGet(space='preTransform')¶
Return all base mesh vertices in the array using their indices (not the 64-bit names).
Parameters: - space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Return type: Point list
Derived from api method maya.OpenMaya.MSpace.vertexBaseMeshGet
- vertexBaseMeshSet(space='preTransform')¶
Set the positions for the base mesh vertices using the 0, 1,... indexing instead of the 64-bit vertex names.
Parameters: - space : Space.Space
Specifies the coordinate system for this operation
values: ‘transform’, ‘preTransform’, ‘object’, ‘world’
Return type: Point list
Derived from api method maya.OpenMaya.MSpace.vertexBaseMeshSet
- vertexEditsClearAllNonBase()¶
Find all vertices with edits and remove those edits, setting them back to their original position. Derived from api method maya.OpenMaya.MFnSubd.vertexEditsClearAllNonBase
Undo is not currently supported for this method