Go to: Synopsis. Return value. MEL examples.

Synopsis

publishAnchorNodes(int $asParent, int $namingConvention, string $customName, string $nodes[], int $publish)

This script can be used to publish nodes as parent or child anchors on their container. The naming convention flag allows you to choose the following names for the published attribute: 0 = used the node name, 1 = prepend the node name to the supplied custom name, 2 = used the custom name. In all cases, an index will be added to the resulting name if it is required to make the name unique. The script can also be used to unpublish nodes.

Return value

None

Arguments

Variable Name Variable Type Description
$asParent int If 1, publish as parent anchor, else child.
$namingConvention int How to choose the publish name. See description.
$customName string Custom name for $namingConvention 1 and 2
$nodes string[] Nodes to publish.
$publish int True for publish, false for unpublish.

MEL examples

      // publish the selected nodes as parent anchors, with the naming convention
  // of "parent_<nodeName>"
        publishAnchorNodes 1 1 "parent" `ls -sl` 1;