#include <MPxToolCommand.h>
This is the base class for interactive tool commands.
An interactive tool command is a command that can be invoked as a MEL command or from within a user defined context (see MPxContext).
Tool commands have the same functionality as MPxCommands, but include several additional methods for use in interactive contexts: setUpInteractive, cancel, finalize, and doFinalize.
Public Member Functions | |
MPxToolCommand () | |
virtual | ~MPxToolCommand () |
virtual MStatus | doIt (const MArgList &args)=0 |
virtual MStatus | cancel () |
virtual MStatus | finalize () |
Protected Member Functions | |
MStatus | doFinalize (MArgList &command) |
USE _doFinalize() IN SCRIPT. |
MPxToolCommand::MPxToolCommand | ( | ) |
Class constructor. This constructor should only be called from within a user context that uses this tool.
The context is responsible for setting up the internal state variables for the derived tools and for creating a command string for journalling.
MPxToolCommand::~MPxToolCommand | ( | ) | [virtual] |
Class Destructor. The user can override this method to free up any allocated data within the derived MPxToolCommand class.
This method should perform a command by setting up internal class data and then calling the redoIt method. The actual action performed by the command should be done in the redoIt method. This is a pure virtual method, and must be overridden in derived classes.
Reimplemented from MPxCommand.
MStatus MPxToolCommand::cancel | ( | ) | [virtual] |
This method cancels the command. The user should override this method when the original program state needs to be restored.
MStatus MPxToolCommand::finalize | ( | ) | [virtual] |
This method is used to create a string representing the command and its arguments. Users should override this method and contruct an MArgList and then pass it to doFinalize for journalling.
USE _doFinalize() IN SCRIPT.
Call this method with an MArgList representing your command. This method will register the command with the undo manager for journalling.
[in] | command | An MArgList reference representing an equivalent MEL command |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |