pymel.core.general

Contains general node and attribute functions, as well as the main PyNode base class.

For the rest of the class hierarchy, including DependNode, Transform, and Attribute, see pymel.core.nodetypes.

Functions

about This command displays version information about the application if it is executed without flags.
addAttr This command is used to add a dynamic attribute to a node or nodes.
addExtension This command is used to add an extension attribute to a node type.
affectedNet This command gets the list of attributes on a node or node type and creates nodes of type TdnAffect, one for each attribute, that are connected iff the source node’s attribute affects the destination node’s attribute.
affects This command returns the list of attributes on a node or node type which affect the named attribute.
aliasAttr Allows aliases (alternate names) to be defined for any attribute of a specified node.
align Align or spread objects along X Y and Z axis.
applyAttrPattern Take the attribute structure described by a pre-defined pattern and apply it either to a node (as dynamic attributes) or a node type (as extension attributes).
artAttrTool The artAttrTool command manages the list of tool types which are used for attribute painting.
assembly Command to register assemblies for the scene assembly framework, to create them, and to edit and query them.
assignCommand This command allows the user to assign hotkeys and manipulate the internal array of named command objects.
attributeInfo This command lists all of the attributes that are marked with certain flags.
attributeName This command takes one node.attribute-style specifier on the command line and returns either the attribute’s long, short, or nice name.
attributeQuery attributeQuery returns information about the configuration of an attribute. It handles both boolean flags, returning
bakePartialHistory This command is used to bake sections of the construction history of a shape node when possible.
baseTemplate This is the class for the commands that edit and/or query templates.
baseView A view defines the layout information for the attributes of a particular node type or container.
color This command sets the dormant wireframe color of the specified objects to be their class color or if the -ud/userDefined flag is specified, one of the user defined colors.
colorIndex The index specifies a color index in the color palette.
colorManagementCatalog This non-undoable action performs additions and removals of custom color transforms from the Autodesk native color transform catalog.
colorManagementFileRules This non-undoable action manages the list of rules that Maya uses to assign an initial input color space to dependency graph nodes that read in color information from a file.
colorManagementPrefs This command allows querying and editing the color management global data in a scene.
commandEcho This command controls what is echoed to the command window.
commandLogging This command controls logging of Maya commands, in memory and on disk.
commandPort Opens or closes the Maya command port.
condition This command creates a new named condition object whose true/false value is calculated by running a mel script.
connectAttr Connect the attributes of two dependency nodes and return the names of the two connected attributes.
connectionInfo The connectionInfocommand is used to get information about connection sources and destinations.
container This command can be used to create and query container nodes.
containerBind This is an accessory command to the container command which is used for some automated binding operations on the container.
containerProxy Creates a new container with the same published interface, dynamic attributes and attribute values as the specified container but with fewer container members.
containerPublish This is an accessory command to the container command which is used for some advanced publishing operations on the container.
containerTemplate A container template is a description of a container’s published interface.
containerView A container view defines the layout information for the published attributes of a particular container.
contextInfo This command allows you to get information on named contexts.
copyAttr Given two nodes, transfer the connections and/or the values from the first node to the second for all attributes whose names and data types match.
createAttrPatterns Create a new instance of an attribute pattern given a pattern type (e.g.
createDisplayLayer Create a new display layer.
createNode This command creates a new node in the dependency graph of the specified type.
currentUnit This command allows you to change the units in which you will work in Maya.
curveRGBColor This command creates, changes or removes custom curve colors, which are used to draw the curves in the Graph Editor.
cycleCheck This command searches for plug cycles in the dependency graph.
delete This command is used to delete selected objects, or all objects, or objects specified along with the command.
deleteAttr This command is used to delete a dynamic attribute from a node or nodes.
deleteAttrPattern After a while the list of attribute patterns could become cluttered.
deleteExtension This command is used to delete an extension attribute from a node type.
disconnectAttr Disconnects two connected attributes.
displayAffected Turns on/off the special coloring of objects that are affected by the objects that are currently in the selection list.
displayColor This command changes or queries the display color for anything in the application that allows the user to set its color.
displayCull This command is responsible for setting the display culling property of back faces of surfaces.
displayLevelOfDetail This command is responsible for setting the display level-of-detail for edit refreshes.
displayPref This command sets/queries the state of global display parameters.
displayRGBColor This command changes or queries the display color for anything in the application that allows the user to set its color.
displaySmoothness This command is responsible for setting the display smoothness of NURBS curves and surfaces to either predefined or custom values.
displayStats

Flags:

displaySurface This command toggles display options on the specified or active surfaces.
distanceDimension This command is used to create a distance dimension to display the distance between two specified points.
duplicate This command duplicates the given objects.
editDisplayLayerGlobals Edit the parameter values common to all display layers.
editDisplayLayerMembers This command is used to query and edit membership of display layers.
encodeString This action will take a string and encode any character that would need to be escaped before being sent to some other command.
evalDeferred This command takes the string it is given and evaluates it during the next available idle time.
exactWorldBoundingBox This command figures out an exact-fit bounding box for the specified objects (or selected objects if none are specified) This bounding box is always in world space.
format This command takes a format string, where the format string contains format specifiers.
getAttr This command returns the value of the named object’s attribute.
getClassification Returns the classification string for a given node type.
getEnums Get the enumerators for an enum attribute.
group This command groups the specified objects under a new group and returns the name of the new group.
hasAttr convenience function for determining if an object has an attribute.
hide The hidecommand is used to make objects invisible.
hilite Hilites/Unhilites the specified object(s).
inheritTransform This command toggles the inherit state of an object.
instance Instancing is a way of making the same object appear twice in the scene.
instanceable Flags one or more DAG nodes so that they can (or cannot) be instanced.
instancer This command is used to create a instancer node and set the proper attributes in the node.
isConnected The isConnectedcommand is used to check if two plugs are connected in the dependency graph.
isDirty The isDirtycommand is used to check if a plug is dirty.
isTrue This commmand returns the state of the named condition.
isolateSelect This command turns on/off isolate select mode in a specified modeling view, specified as the argument.
itemFilter This command creates a named itemFilter object.
itemFilterAttr This command creates a named itemFilterAttr object.
itemFilterRender

Flags:

itemFilterType This command queries a named itemFilter object.
license This command displays version information about the application if it is executed without flags.
listAttr This command lists the attributes of a node.
listAttrPatterns Attribute patterns are plain text descriptions of an entire Maya attribute forest.
listConnections This command returns a list of all attributes/objects of a specified type that are connected to the given object(s).
listFuture Modifications:
listHistory This command traverses backwards or forwards in the graph from the specified node and returns all of the nodes whose construction history it passes through.
listNodeTypes Lists dependency node types satisfying a specified classification string.
listNodesWithIncorrectNames List all nodes with incorrect names in the Script Editor.
listRelatives This command lists parents and children of DAG objects.
listSets The listSets command is used to get a list of all the sets an object belongs to.
listTransforms Modifications:
lockNode Locks or unlocks one or more dependency nodes.
ls The lscommand returns the names (and optionally the type names) of objects in the scene.
makeIdentity The makeIdentity command is a quick way to reset the selected transform and all of its children down to the shape level by the identity transformation.
makeLive This commmand makes an object live.
makePaintable Make attributes of nodes paintable to Attribute Paint Tool.
matchTransform This command modifies the source object’s transform to match the target object’s transform.
move The move command is used to change the positions of geometric objects.
nodeCast Given two nodes, a source node of type A and a target node of type B, where type A is either type B or a sub-type of B, this command will replace the target node with the source node.
nodeType This command returns a string which identifies the given node’s type.
objExists This command simply returns true or false depending on whether an object with the given name exists.
objectCenter This command returns the coordinates of the center of the bounding box of the specified object.
objectType This command returns the type of elements.
paramDimension This command is used to create a param dimension to display the parameter value of a curve/surface at a specified point on the curve/surface.
paramLocator The command creates a locator in the underworld of a NURBS curve or NURBS surface at the specified parameter value.
parent This command parents (moves) objects under a new group, removes objects from an existing group, or adds/removes parents.
partition This command is used to create, query or add/remove sets to a partition.
pause Pause for a specified number of seconds for canned demos or for test scripts to allow user to view results.
performanceOptions Sets the global performance options for the application.
pickWalk The pickWalk command allows you to quickly change the selection list relative to the nodes that are currently selected.
pixelMove The pixelMove command moves objects by what appears as pixel units based on the current view.
polySplitCtx2 Create a new context to split facets on polygonal objects In query mode, return type is based on queried flag.
refresh This command is used to force a redraw during script execution.
relationship This is primarily for use with file IO.
removeMultiInstance Removes a particular instance of a multiElement.
rename Renames the given object to have the new name.
renameAttr Renames the given user-defined attribute to the name given in the string argument.
reorder This command reorders (moves) objects relative to their siblings.
reorderContainer This command reorders (moves) objects relative to their siblings in a container.
resetTool This command resets a tool back to its factory settings
rotate The rotate command is used to change the rotation of geometric objects.
saveToolSettings This command causes all the tools not on the shelf to save their settings as optionVars.
scale The scale command is used to change the sizes of geometric objects.
scaleComponents This is a limited version of the scale command.
select This command is used to put objects onto or off of the active list.
selectKey This command operates on a keyset.
selectMode The selectModecommand is used to change the selection mode.
selectPref This command controls state variables used to selection UI behavior.
selectPriority The selectPrioritycommand is used to change the selection priority of particular types of objects that can be selected when using the select tool.
selectType The selectTypecommand is used to change the set of allowable types of objects that can be selected when using the select tool.
selected ls -sl
selectedNodes

Flags:

selectionConnection This command creates a named selectionConnection object.
setAttr Sets the value of a dependency node attribute.
setEnums Set the enumerators for an enum attribute.
setToolTo This command switches control to the named context.
sets This command is used to create a set, query some state of a set, or perform operations to update the membership of a set.
shapeCompare Compares two shapes.
showHidden The showHiddencommand is used to make invisible objects visible.
snapMode The snapMode command is used to control snapping.
softSelect This command allows you to change the soft modelling options.
spaceLocator The command creates a locator at the specified position in space.
strDeprecateDecorator
stringArrayIntersector The stringArrayIntersector command creates and edits an object which is able to efficiently intersect large string arrays.
suitePrefs This command sets the mouse and keyboard interaction mode for Maya and other Suites applications (if Maya is part of a Suites install).
symmetricModelling This command allows you to change the symmetric modelling options.
threadCount This command sets the number of threads to be used by Maya in regions of code that are multithreaded.
timeCode Use this command to query and set the time code information in the file
toggle The toggle command is used to toggle the display of various object features for objects which have these components.
toggleAxis Toggles the state of the display axis.
toolDropped This command builds and executes the commands necessary to recreate the specified tool button.
toolHasOptions This command queries a tool to see if it has options.
toolPropertyWindow End users should only call this command as 1.
transformCompare Compares two transforms passed as arguments.
transformLimits The transformLimits command allows us to set, edit, or query the limits of the transformation that can be applied to objects.
ungroup This command ungroups the specified objects.
uniqueObjExists Returns True if name uniquely describes an object in the scene.
upAxis The upAxis command changes the world up direction.
validComponentIndexType True if argObj is of a suitable type for specifying a component’s index.
vnn This command is used for operations that apply to a whole VNN runtime, for example Bifrost.
vnnCompound The vnnCompoundcommand is used to operate compound and its VNN graph.
vnnConnect Makes a connection between two VNN node ports.
vnnCopy Copy a set of VNN nodes to clipper board.
vnnNode The vnnNodecommand is used to operate vnnNode and query its port and connections.
vnnPaste Paste the copied VNN nodes to target VNN compound.
webView This command allows the user to bring up a web page view
xform This command can be used query/set any element in a transformation node.
xformConstraint This command allows you to change the transform constraint used by the transform tools during component transforms.

Classes

Attribute Attribute class
AttributeDefaults
Component Abstract base class for pymel components.
Component1D
Component1D64
Component1DFloat
Component2D
Component2DFloat
Component3D
ComponentIndex Class used to specify a multi-dimensional component index.
ContinuousComponent Components whose dimensions are continuous.
DimensionedComponent Components for which having a __getitem__ of some sort makes sense
DiscreteComponent Components whose dimensions are discretely indexed.
HashableSlice
LatticePoint
MItComponent Abstract base class for pymel components that can be accessed via iterators.
MItComponent1D
MeshEdge
MeshFace
MeshUV
MeshVertex
MeshVertexFace
NodeTracker A class for tracking Maya Objects as they are created and deleted.
NurbsCurveCV
NurbsCurveEP
NurbsCurveKnot
NurbsCurveParameter
NurbsSurfaceCV
NurbsSurfaceEP
NurbsSurfaceFace
NurbsSurfaceIsoparm
NurbsSurfaceKnot
NurbsSurfaceRange
ParticleComponent
Pivot
ProxySlice slice(stop)
PyNode Abstract class that is base for all pymel nodes classes.
Scene The Scene class provides an attribute-based method for retrieving PyNode instances of nodes in the current scene.
SubdEdge
SubdFace
SubdUV
SubdVertex

Exceptions

AmbiguityWarning
MayaAttributeEnumError([node, enum])
MayaAttributeError([node])
MayaComponentError([node])
MayaNodeError([node])
MayaObjectError([node])
MayaParticleAttributeError([node])