Go to: Synopsis. Return value. MEL examples.

Synopsis

containerAutopublishRoot

This script will check if the selected container contains dag nodes that are all within a single dag hierarchy. If it does, then the highest object within that hierarchy will be published as the root transform and parent/child anchor. If the container has no dag nodes, or consists of multiple hierarchies, this method will do nothing.

Return value

None

Arguments

Variable Name Variable Type Description
$objsstring[], the selection to be considered when choosing a root
$valintif 1, publish the translate, rotate and scale for the root
$previewintif 1, print the name of the node that would be published as root.

MEL examples

	// auto publish the root for container1, and publish its TRS attributes
	select -r container1;
	containerAutopublishRoot 1 0;