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

Synopsis

buttonManip [-icon string] script [selectionItem]

buttonManip is undoable, NOT queryable, and NOT editable.

This creates a button manipulator. This manipulator has a position in space and a triad manip for positioning. When you click on the top part of the manip, the command defined by the first argument is executed. The command is associated with the manipulator when it is created.

If a dag object is included on the command line, the manip will be parented to the object. This means moving the object will move the manip. You can move the manip independently of the object using its triad.

Note that a buttonManip may not be parented to more than one object.

Return value

None

Flags

icon
Long name (short name) Argument types Properties
-icon(-i) string create
Specify an icon to represent the manipulator.

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

//    Example 1.
//
//    Create a button manipulator that will be parented to a sphere and will
//    print "Button Manipulator" whenever it is pressed.
//
//    Note that moving the sphere will also move the manipulator.
//
string $sphere[] = `sphere`;
buttonManip "print \"Button Manipulator\\n\"" $sphere[0];

//    Example 2.
//
//    Create a button manipulator that will execute the 'setKeyframe' command
//    when it is pressed.
//
buttonManip "setKeyframe";