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

Synopsis

reorderContainer [-back] [-front] [-relative int]

reorderContainer is undoable, queryable, and editable.

This command reorders (moves) objects relative to their siblings in a container. For relative moves, both positive and negative numbers may be specified. Positive numbers move the object forward and negative numbers move the object backward amoung its siblings. When an object is at the end (beginning) of the list of siblings, a relative move of 1 (-1) will put the object at the beginning (end) of the list of siblings. That is, relative moves will wrap if necessary. Only nodes within one container can be moved at a time. Note: The container command's -nodeList flag will return a sorted list of contained nodes. To see the effects of reordering, use the -unsortedOrder flag in conjunction with the -nodeList flag.

Return value

none

In query mode, return type is based on queried flag.

Keywords

node, container, reorder

Related

container

Flags

back, front, relative
Long name (short name) Argument types Properties
-front(-f) createqueryedit
Move object(s) to front of container contents list
-back(-b) createqueryedit
Move object(s) to back of container contents list
-relative(-r) int createqueryedit
Move object(s) relative to other container contents

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// create a container
sphere -n sphere1;
sphere -n sphere2;
sphere -n sphere3;
sphere -n sphere4;
container -addNode {"sphere1", "sphere2", "sphere3", "sphere4"} -n "sphereCon";
// The container sphereCon contains sphere1, sphere2, sphere3 and sphere4.
// The command below moves sphere2 before sphere1.
reorderContainer -r -1 sphere2;
// make sphere1 the first sibling
reorderContainer -front sphere1;
// move sphere3 forward 2 siblings. Moving it forward one
// sibling would put it at the end. Moving it forward again
// puts it at the beginning.
reorderContainer -r 2 sphere3;