MAXScript Language Reference > Names, Literal Constants, and Expressions > Context Expressions >

# at level; in

The at level <node> and in <node> contexts set the specified node to be the effective root for any pathnames specified, or scene objects created, in the context. These contexts automatically prefix the specified node to any pathnames in the context. They also set the specified node to be the parent for any scene objects created in the context.

To be able to use pathnames within level contexts to name objects anywhere in the scene, you can override the current working level by using a rooted pathname. A rooted pathname has an extra "/" before the first-level name and indicates "start at the actual root of the object tree".

FOR EXAMPLE,
    scale $/baz/* [1,1,2]
operates on the object baz in the actual top level, not just as a child of the current working level.

You can also use this rooted pathname form to force a pathname to only consider top-level objects when you name a single object.

FOR EXAMPLE,
    $foo
looks throughout the whole scene, at all levels for an object named foo ,
BUT
    $/foo
will only look for a top-level object named foo .

EXAMPLES:
    in $mannequin01...LClav...hand --set context to hand
    $mannequin01.spine.LClav.arm.hand
    (
    rotate $thumb1 15 y_axis --rotate hand's child thumb
    rotate $finger11 10 y_axis --rotate hand's child first finger
    PalmCenter=$finger21.parent.pos --get hand's position
    PalmCenter+=(LHandPos-$finger21.pos)/2.--calculate center of palm
    --create a dummy there, dummy is a child of the hand:
    dummy name:"palmLink" pos:PalmCenter
    )
    in $dummy
    (
    -- create automatically as children of $dummy:
    sphere name:"ear1" pos:[10,10,10]
    sphere name:"ear2" pos:[-10,10,10]
    scale $foo/* [1,1,2] --look for 'foo' as a child of $dummy
    )