Go to: Synopsis. Return value. Keywords. MEL examples.

Synopsis

string objectLayer( string )

All eligible objects (ie. DAG objects) must be in exactly one layer. This script returns the layer to which the given object belongs.

Return value

None

Keywords

DAG displayLayer layer member ,

Arguments

Variable Name Variable Type Description
$objectstring The name of the object who's layer is to be found.

MEL examples

      // Create an object, which will automatically go into the defaultLayer
      createNode transform -n father;
      objectLayer father;
      // Result : defaultLayer //

      // Put the object into a layer and verify membership
      createDisplayLayer -e -n fatherLayer;
      editDisplayLayerMembers fatherLayer father;
      objectLayer father;
      // Result : fatherLayer //

      // The time node is not a DAG node and so has no layer
      objectLayer time1;

      // The above blank line indicates that there was no return value