Go to: Synopsis. Return value. MEL examples.

Synopsis

containerAssignMaterial(string $container, string $object)

This command assigns the object to the shading group found in the container. If there is more than one shading group in the container, the user can control which shading group is used by publishing the shading group as a published node with the name "mainSG". If no object is specified, the command will work on the selection.

Return value

None

Arguments

Variable Name Variable Type Description
$containerstringthe container with the shader
$objectstringthe object to associate with the shader, or an empty string to act on selection

MEL examples

		// Associate the selection to the shading group of $containerName
		containerAssignMaterial $containerName "";

		// Associate the a mesh to the shading group of $containerName
		containerAssignMaterial $containerName $mesh;