![]() # To confirm that sphere1Shape really is a nurbs surface:Ĭmds. Returns the type name given an integer type tag. vtx in v print selectedVerts for v in selectedVerts: pos cmds.xform ( v, queryTrue, translationTrue, worldSpaceTrue ) cmds. That is used to identify nodes of a given type in the binary file import maya.cmds as cmds selectedVerts v for v in cmds.ls (slTrue, flTrue) if. import maya.cmds as mc selected vertices for vertex in mc.ls(sl1, fl1): print vertex Get all vertices individually from a mesh (obj). Returns an integer tag that is unique for that object type. This python example loops through each individual vertex from the selection. Returns true if the object is the specified type or derivesįrom an object that is of the specified type. Returns true if the object is exactly of the specified type. Related addAttr, aliasAttr, attributeInfo, deleteAttr, getClassification, nodeType, objExists, renameAttr Flags isAType, isType, tagFromType, typeFromTag, typeTag Long name (short name) Incomplete and may not be supported by all object types.įor "isType": was the object of the specified type? This command returns the type of elements. Maya python (or MEL) select objects MAYA Python: getting the position of selected object using getAttr Selecting Faces in a list, maya python Maya Python. ObjectType is undoable, NOT queryable, and NOT If that flag is not enabled than this flag will return the same thing as the -sl/selection flag would. ![]() on the value of the -tso/trackSelectionOrder flag of the selectPref command. Note: Strings representing object names andĪrguments must be separated by commas. List objects and components that are currently selected in their order of selection. # List the name of the shape below the transform node.Ĭmds.ObjectType( object, ,, ,, ) # create an object and an instance for queries List all relatives of the specified type. Return full pathnames instead of object names. Return a proper object name that can be passed to other Normally, thisĬommand only returns the parent corresponding to the first instance Returns all the parents of this dag node. List all the children of this dag node that are shapes (ie, not Note that it lists grand-children before children. ![]() ![]() If a descendent is instanced, it will appear only once on the list Returns all the children, grand-children etc. List all the children of this dag node (default). NoIntermediate, parent, path, shapes, type Long name (short name) It causes any intermediate shapes among the descendents to beįlags allDescendents, allParents, children, fullPath, The -ni/noIntermediate flag works with the -s/shapes flag. Listing children of components of objects returns When listingĬhildren, shape nodes will return their underworld objects in the Of components of objects will return the object. Their containing shape node in the list of parents. selected cmds. Objects directly under a shape (underworld objects) will return 1 Answer Sorted by: 5 cmds.ls will return a list, you need to check the list and delete what ever you want to delete, and sn is very bad always use long name because there can be duplicates. The command will return an empty parent list. When listing parents of objects directly under the world, c/children, -ad/allDescendents, -s/shapes, -p/parent and This command lists parents and children of DAG objects. ListRelatives is undoable, NOT queryable, and NOT Note: Strings representing object names andĪrguments must be separated by commas.
0 Comments
Leave a Reply. |