pymel.core.nodetypes.Container

Inheritance diagram of Container

class Container(*args, **kwargs)

class counterpart of mel function container

This command can be used to create and query container nodes. It is also used to perform operations on containers such as: add and remove nodes from the containerpublish attributes from nodes inside the containerreplace the connections and values from one container onto another oneremove a container without removing its member nodes

addNode(val=True, **kwargs)

Specifies the list of nodes to add to container.

Derived from mel command maya.cmds.container

force(val=True, **kwargs)

This flag can be used in conjunction with -addNode flag only. If specified, then nodes will be disconnected from their current containers before they are added to new one.

Derived from mel command maya.cmds.container

getAsset(**kwargs)

When queried, if all the nodes in nodeList belong to the same container, returns container’s name. Otherwise returns empty string. This flag is functionally equivalent to the findContainer flag.

Derived from mel command maya.cmds.container

getAssetMember(**kwargs)

Can be used during query in conjunction with the bindAttr flag to query for the only published attributes related to the specified node within the container.

Derived from mel command maya.cmds.container

getBindAttr(**kwargs)

Bind a contained attribute to an unbound published name on the interface of the container; returns a list of bound published names. The first string specifies the node and attribute name to be bound in “node.attr” format. The second string specifies the name of the unbound published name. In query mode, returns a string array of the published names and their corresponding attributes. The flag can also be used in query mode in conjunction with the -publishName, -publishAsParent, and -publishAsChild flags.

Derived from mel command maya.cmds.container

getConnectionList(**kwargs)

Returns a list of the exterior connections to the container node.

Derived from mel command maya.cmds.container

getCurrent(**kwargs)

In create mode, specify that the newly created asset should be current. In edit mode, set the selected asset as current. In query, return the current asset.

Derived from mel command maya.cmds.container

getFileName(**kwargs)

Used to query for the assets associated with a given file name.

Derived from mel command maya.cmds.container

getFindContainer(**kwargs)

When queried, if all the nodes in nodeList belong to the same container, returns container’s name. Otherwise returns empty string.

Derived from mel command maya.cmds.container

getIsContainer(**kwargs)

Return true if the selected or specified node is a container node. If multiple containers are queried, only the state of the first will be returned.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.container

getNodeList(**kwargs)

When queried, returns a list of nodes in container.

Derived from mel command maya.cmds.container

getPublishAsChild(**kwargs)

Publish contained node to the interface of the container to indicate it can be a child of external nodes. The second string is the name of the published node. In query mode, returns a string of the published names and the corresponding nodes. If -publishName flag is used in query mode, only returns the published names; if -bindAttr flag is used in query mode, only returns the name of the published nodes.

Derived from mel command maya.cmds.container

getPublishAsParent(**kwargs)

Publish contained node to the interface of the container to indicate it can be a parent to external nodes. The second string is the name of the published node. In query mode, returns a string of array of the published names and the corresponding nodes. If -publishName flag is used in query mode, only returns the published names; if -bindAttr flag is used in query mode, only returns the name of the published nodes.

Derived from mel command maya.cmds.container

getPublishAsRoot(**kwargs)

Publish or unpublish a node as a root. The significance of root transform node is twofold. When container-centric selection is enabled, the root transform will be selected if a container node in the hierarchy below it is selected in the main scene view. Also, when exporting a container proxy, any published root transformation attributes such as translate, rotate or scale will be hooked up to attributes on a stand-in node. In query mode, returns the node that has been published as root.

Derived from mel command maya.cmds.container

getPublishAttr(**kwargs)

In query mode, can only be used with the -publishName(-pn) flag, and takes an attribute as an argument; returns the published name of the attribute, if any.

Derived from mel command maya.cmds.container

getPublishName(**kwargs)

Publish a name to the interface of the container, and returns the actual name published to the interface. In query mode, returns the published names for the container. If the -bindAttr flag is specified, returns only the names that are bound; if the -unbindAttr flag is specified, returns only the names that are not bound; if the -publishAsParent/-publishAsChild flags are specified, returns only names of published parents/children. if the -publishAttr is specified with an attribute argument in the “node.attr” format, returns the published name for that attribute, if any.

Derived from mel command maya.cmds.container

getType(**kwargs)

By default, a container node will be created. Alternatively, the type flag can be used to indicate that a different type of container should be created. At the present time, the only other valid type of container node is “dagContainer”.

Derived from mel command maya.cmds.container

getUnbindAttr(**kwargs)

Unbind a published attribute from its published name on the interface of the container, leaving an unbound published name on the interface of the container; returns a list of unbound published names. The first string specifies the node and attribute name to be unbound in “node.attr” format, and the second string specifies the name of the bound published name. In query mode, can only be used with the -publishName, -publishAsParent and -publishAsChild flags.

Derived from mel command maya.cmds.container

getUnsortedOrder(**kwargs)

The -nodeList/-nl flag will return a sorted list of nodes. This flag can be used to get the nodes in the order they were added to the container. This will also display any reordering done with the reorderContainer command.

Derived from mel command maya.cmds.container

includeHierarchyAbove(val=True, **kwargs)

Used to specify that the parent hierarchy of the supplied node list should also be included in the container (or deleted from the container). Hierarchy inclusion will stop at nodes which are members of other containers.

Derived from mel command maya.cmds.container

includeHierarchyBelow(val=True, **kwargs)

Used to specify that the hierarchy below the supplied node list should also be included in the container (or delete from the container). Hierarchy inclusion will stop at nodes which are members of other containers.

Derived from mel command maya.cmds.container

includeNetwork(val=True, **kwargs)

Used to specify that the node network connected to supplied node list should also be included in the container. Network traversal will stop at default nodes and nodes which are members of other containers.

Derived from mel command maya.cmds.container

includeNetworkDetails(val=True, **kwargs)

Used to specify specific parts of the network that should be included. Valid arguments to this flag are: “channels”, “sdk”, “constraints”, “history” and “expressions”, “inputs”, “outputs”. The difference between this flag and the includeNetwork flag, is that it will include all connected nodes regardless of their type. Note that dag containers include their children, so they will always include constraint nodes that are parented beneath the selected objects, even when constraints are not specified as an input.

Derived from mel command maya.cmds.container

includeShaders(val=True, **kwargs)

Used to specify that for any shapes included, their shaders will also be included in the container.

Derived from mel command maya.cmds.container

includeShapes(val=True, **kwargs)

Used to specify that for any transforms selected, their direct child shapes will be included in the container (or deleted from the container). This flag is not necessary when includeHierarchyBelow is used since the child shapes and all other descendents will automatically be included.

Derived from mel command maya.cmds.container

includeTransform(val=True, **kwargs)

Used to specify that for any shapes selected, their parent transform will be included in the container (or deleted from the container). This flag is not necessary when includeHierarchyAbove is used since the parent transform and all of its parents will automatically be included.

Derived from mel command maya.cmds.container

nodeNamePrefix(val=True, **kwargs)

Specifies that the name of published attributes should be of the form “node_attr”. Must be used with the -publishConnections/-pc flag.

Derived from mel command maya.cmds.container

publishAndBind(val=True, **kwargs)

Publish the given name and bind the attribute to the given name. First string specifies the node and attribute name in “node.attr” format. Second string specifies the name it should be published with.

Derived from mel command maya.cmds.container

publishConnections(val=True, **kwargs)

Publish all connections from nodes inside the container to nodes outside the container.

Derived from mel command maya.cmds.container

removeContainer(val=True, **kwargs)

Disconnects all the nodes from container and deletes container node.

Derived from mel command maya.cmds.container

removeNode(val=True, **kwargs)

Specifies the list of nodes to remove from container.

Derived from mel command maya.cmds.container

setBindAttr(val=True, **kwargs)

Bind a contained attribute to an unbound published name on the interface of the container; returns a list of bound published names. The first string specifies the node and attribute name to be bound in “node.attr” format. The second string specifies the name of the unbound published name. In query mode, returns a string array of the published names and their corresponding attributes. The flag can also be used in query mode in conjunction with the -publishName, -publishAsParent, and -publishAsChild flags.

Derived from mel command maya.cmds.container

setCurrent(val=True, **kwargs)

In create mode, specify that the newly created asset should be current. In edit mode, set the selected asset as current. In query, return the current asset.

Derived from mel command maya.cmds.container

setPublishAsChild(val=True, **kwargs)

Publish contained node to the interface of the container to indicate it can be a child of external nodes. The second string is the name of the published node. In query mode, returns a string of the published names and the corresponding nodes. If -publishName flag is used in query mode, only returns the published names; if -bindAttr flag is used in query mode, only returns the name of the published nodes.

Derived from mel command maya.cmds.container

setPublishAsParent(val=True, **kwargs)

Publish contained node to the interface of the container to indicate it can be a parent to external nodes. The second string is the name of the published node. In query mode, returns a string of array of the published names and the corresponding nodes. If -publishName flag is used in query mode, only returns the published names; if -bindAttr flag is used in query mode, only returns the name of the published nodes.

Derived from mel command maya.cmds.container

setPublishAsRoot(val=True, **kwargs)

Publish or unpublish a node as a root. The significance of root transform node is twofold. When container-centric selection is enabled, the root transform will be selected if a container node in the hierarchy below it is selected in the main scene view. Also, when exporting a container proxy, any published root transformation attributes such as translate, rotate or scale will be hooked up to attributes on a stand-in node. In query mode, returns the node that has been published as root.

Derived from mel command maya.cmds.container

setPublishName(val=True, **kwargs)

Publish a name to the interface of the container, and returns the actual name published to the interface. In query mode, returns the published names for the container. If the -bindAttr flag is specified, returns only the names that are bound; if the -unbindAttr flag is specified, returns only the names that are not bound; if the -publishAsParent/-publishAsChild flags are specified, returns only names of published parents/children. if the -publishAttr is specified with an attribute argument in the “node.attr” format, returns the published name for that attribute, if any.

Derived from mel command maya.cmds.container

setUnbindAttr(val=True, **kwargs)

Unbind a published attribute from its published name on the interface of the container, leaving an unbound published name on the interface of the container; returns a list of unbound published names. The first string specifies the node and attribute name to be unbound in “node.attr” format, and the second string specifies the name of the bound published name. In query mode, can only be used with the -publishName, -publishAsParent and -publishAsChild flags.

Derived from mel command maya.cmds.container

unbindAndUnpublish(val=True, **kwargs)

Unbind the given attribute (in “node.attr” format) and unpublish its associated name. Unbinding a compound may trigger unbinds of its compound parents/children. So the advantage of using this one flag is that it will automatically unpublish the names associated with these automatic unbinds.

Derived from mel command maya.cmds.container

unbindChild(val=True, **kwargs)

Unbind the node published as child, but do not remove its published name from the interface of the container.

Derived from mel command maya.cmds.container

unbindParent(val=True, **kwargs)

Unbind the node published as parent, but do not remove its published name from the interface of the container.

Derived from mel command maya.cmds.container

unpublishChild(val=True, **kwargs)

Unpublish node published as child from the interface of the container

Derived from mel command maya.cmds.container

unpublishName(val=True, **kwargs)

Unpublish an unbound name from the interface of the container.

Derived from mel command maya.cmds.container

unpublishParent(val=True, **kwargs)

Unpublish node published as parent from the interface of the container

Derived from mel command maya.cmds.container

Previous topic

pymel.core.nodetypes.Constraint

Next topic

pymel.core.nodetypes.ContainerBase

Core

Core Modules

Other Modules

This Page