Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.

Synopsis

containerPublish([bindNode=[string, string]], [bindTemplateStandins=boolean], [inConnections=boolean], [mergeShared=boolean], [outConnections=boolean], [publishNode=[string, string]], [unbindNode=string], [unpublishNode=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

containerPublish is undoable, queryable, and editable.

This is an accessory command to the container command which is used for some advanced publishing operations on the container. For example, the "publishConnections" flag on the container will publish all the connections, but this command can be used to publish just the inputs, outputs, or to collapse the shared inputs into a single attribute before publishing.

Return value

none

In query mode, return type is based on queried flag.

Keywords

publish, container

Related

container, containerProxy, containerTemplate

Flags

bindNode, bindTemplateStandins, inConnections, mergeShared, outConnections, publishNode, unbindNode, unpublishNode
Long name (short name) Argument types Properties
inConnections(ic) boolean create
Specifies that the unpublished connections to nodes in the container from external nodes should be published.
outConnections(oc) boolean create
Specifies that the unpublished connections from nodes in the container to external nodes should be published.
mergeShared(ms) boolean create
For use with the inConnections flag. Indicates that when an external attribute connects to multiple internal attributes within the container, a single published attribute should be used to correspond to all of the internal attributes.
publishNode(pn) [string, string] createqueryedit
Publish a name and type. When first published, nothing will be bound. To bind a node to the published name, use the bindNode flag.
unpublishNode(upn) string createqueryedit
Unpublish the specified published node name.
bindNode(bn) [string, string] createqueryedit
Bind the specified node to the published node name.
unbindNode(ubn) string createqueryedit
Unbind the node that is published with the name specified by the flag.
bindTemplateStandins(bts) boolean createqueryedit
This flag will create a temporary stand-in attribute for any attributes that exist in the template but are not already bound. This enables you to set values for unbound attributes.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# create a proxy for container1
#
cmds.containerPublish(container1,inConnections=True,mergeShared=True)
# add a published name 'mainShader' of type 'objectSet'
#
cmds.containerPublish(container1,publishNode=['mainShadingSet','objectSet']
# bind a shading group to the published name
#
containerPublish -bindNode "mainShadingSet" blinn1SG container1;
# query what is bound
#
container -q -bindNode container1;
# unbind the shading group
#
containerPublish -unbindNode "mainShadingSet" container1;