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.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
bindNode (bn) | unicode, unicode | ||
|
|||
bindTemplateStandins (bts) | bool | ||
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 commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
inConnections (ic) | bool | ||
|
|||
mergeShared (ms) | bool | ||
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. |
|||
outConnections (oc) | bool | ||
|
|||
publishNode (pn) | unicode, unicode | ||
|
|||
unbindNode (ubn) | unicode | ||
|
|||
unpublishNode (upn) | unicode | ||
|
Derived from mel command maya.cmds.containerPublish
Example:
import pymel.core as pm
import maya.cmds as cmds
# create a proxy for container1
#
pm.containerPublish(container1,inConnections=True,mergeShared=True)
# add a published name 'mainShader' of type 'objectSet'
#
pm.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;