#include <MPxTexContext.h>
Base class for user defined contexts working on uv editor.
This is the base class for user defined contexts working on uv editor.
Public Member Functions | |
MPxTexContext () | |
Class contstructor. More... | |
virtual | ~MPxTexContext () |
Default destructor. More... | |
virtual MStatus | doPress (MEvent &event, MHWRender::MUIDrawManager &drawMgr, const MHWRender::MFrameContext &context) |
This method is not available in Python. More... | |
virtual MStatus | doRelease (MEvent &event, MHWRender::MUIDrawManager &drawMgr, const MHWRender::MFrameContext &context) |
This method is not available in Python. More... | |
virtual MStatus | doDrag (MEvent &event, MHWRender::MUIDrawManager &drawMgr, const MHWRender::MFrameContext &context) |
This method is not available in Python. More... | |
virtual MStatus | doPtrMoved (MEvent &event, MHWRender::MUIDrawManager &drawMgr, const MHWRender::MFrameContext &context) |
This method is not available in Python. More... | |
void | viewToPort (double xView, double yView, short &xPort, short &yPort) const |
This method is used to convert view coordinates to port (window) coordinates. More... | |
void | portToView (short xPort, short yPort, double &xView, double &yView) const |
This method is used to convert port (window) coordinates to view coordinates. More... | |
void | viewRect (double &left, double &right, double &bottom, double &top) const |
This method is used to get the current uv viewport dimensions. More... | |
void | portSize (double &width, double &height) const |
This method is used to get the window dimension of the current uv viewport. More... | |
virtual MPxToolCommand * | newToolCommand () |
Create a new instance of the tool command associated with this context. More... | |
Public Member Functions inherited from MPxContext | |
MPxContext () | |
Class contstructor. More... | |
virtual | ~MPxContext () |
Default destructor. More... | |
virtual void | toolOnSetup (MEvent &event) |
This method is called when the context is activated, i.e when the toolButton for the context is pressed. More... | |
virtual void | toolOffCleanup () |
This method is called when the context is deactivated, i.e when another context is activated. More... | |
virtual MStatus | doHold (MEvent &event, MHWRender::MUIDrawManager &drawMgr, const MHWRender::MFrameContext &context) |
This method is not available in Python. More... | |
virtual MStatus | drawFeedback (MHWRender::MUIDrawManager &drawMgr, const MHWRender::MFrameContext &context) |
This method is not available in Python. More... | |
virtual MStatus | doPress (MEvent &event) |
This method is called when any mouse button is pressed. More... | |
virtual MStatus | doRelease (MEvent &event) |
This method is called when any mouse button is released. More... | |
virtual MStatus | doDrag (MEvent &event) |
This method is called when a mouse drag event occurs. More... | |
virtual MStatus | doHold (MEvent &event) |
This method is called when a mouse button is pressed but before the mouse is dragged. More... | |
virtual MStatus | doPtrMoved (MEvent &event) |
This method is called when a mouse move event occurs. More... | |
virtual MStatus | doEnterRegion (MEvent &event) |
This method is called when the mouse pointer enters a screen panel region. More... | |
virtual MStatus | helpStateHasChanged (MEvent &event) |
This method is called whenever the help state may need to be updated. More... | |
virtual void | deleteAction () |
This method is called when the delete or backspace key is pressed. More... | |
virtual void | completeAction () |
This method is called when the complete key is pressed. More... | |
virtual MStatus | addManipulator (const MObject &manipulator) |
This method adds a manipulator to the context. More... | |
virtual MStatus | deleteManipulators () |
This method deletes all the manipulators that belong to the context. More... | |
MStatus | setImage (const MString &image, ImageIndex index) |
This method is used to set an XPM icon image that is to be used to represent this tool context in various places including the tool bar and can be queried from mel using the contextInfo command. More... | |
MString | image (ImageIndex index, MStatus *ReturnStatus=NULL) const |
This method is used to retrieve an XPM icon image that has previously been set for this tool context. More... | |
virtual void | abortAction () |
This method is called when the abort key is pressed. More... | |
virtual bool | processNumericalInput (const MDoubleArray &values, const MIntArray &flags, bool isAbsolute) |
This method processes the input from the numerical input field. More... | |
virtual bool | feedbackNumericalInput () const |
This method is called to update the numerical feedback. More... | |
virtual MSyntax::MArgType | argTypeNumericalInput (unsigned int index) const |
This method is used by the feedback line to determine what units to display. More... | |
virtual MString | stringClassName () const |
This method is called to determine the name that uniquely identifies the context. More... | |
virtual void | getClassName (MString &name) const |
NO SCRIPT SUPPORT. More... | |
MStatus | getImage (MString &image, ImageIndex index) const |
NO SCRIPT SUPPORT. More... | |
Static Public Member Functions | |
static bool | getMarqueeSelection (double xMin, double yMin, double xMax, double yMax, const MSelectionMask &mask, bool bPickSingle, bool bIgnoreSelectionMode, MSelectionList &selectionList) |
This method is called when the user performs a selection within the uv editor. More... | |
static const char * | className () |
Returns the name of this class. More... | |
Static Public Member Functions inherited from MPxContext | |
static const char * | className () |
Returns the name of this class. More... | |
Additional Inherited Members | |
Public Types inherited from MPxContext | |
enum | ImageIndex { kImage1 = 0, kImage2, kImage3 } |
Used to select between the three possible images associated with the context. More... | |
Protected Member Functions inherited from MPxContext | |
MStatus | setHelpString (const MString &str) |
USE _setHelpString() IN SCRIPT. More... | |
MStatus | setTitleString (const MString &str) |
USE _setTitleString() IN SCRIPT. More... | |
MStatus | setCursor (const MCursor &cursor) |
USE _setCursor() IN SCRIPT. More... | |
MStatus | beginMarquee (MEvent &event) |
USE _beginMarquee() IN SCRIPT. More... | |
MStatus | dragMarquee (MEvent &event) |
USE _dragMarquee() IN SCRIPT. More... | |
MStatus | releaseMarquee (MEvent &event, short &top, short &left, short &bottom, short &right) |
USE _releaseMarquee() IN SCRIPT. More... | |
Static Protected Member Functions inherited from MPxContext | |
static bool | ignoreEntry (const MIntArray &flags, unsigned int entry) |
USE _ignoreEntry() IN SCRIPT. More... | |
MPxTexContext | ( | ) |
Class contstructor.
This constructor will only be called from MPxContextCommand::makeObj. Users must override this method.
|
virtual |
Default destructor.
Users can override this method to free any user instantiated data when the context is destroyed.
|
virtual |
This method is not available in Python.
This method is called when any mouse button is pressed.
The base method does nothing and should be overridden if the user needs to do anything on a button press.
MUIDrawManager allows for drawing primitives in the 3D modeling space. Those primitives will then be projected onto a 2D overlay plane before being displayed.
The event can be used to get more explicit information about the press such as the button number. See MEvent for more information.
[in] | event | The button press event information. |
[in] | drawMgr | The UI draw manager, it can be used to draw some simple geometry including text. |
[in] | context | Frame level context information |
Reimplemented from MPxContext.
|
virtual |
This method is not available in Python.
This method is called when any mouse button is released.
The base method does nothing and should be overridden if the user needs to do anything on a button release.
MUIDrawManager allows for drawing primitives in the 3D modeling space. Those primitives will then be projected onto a 2D overlay plane before being displayed.
The event can be used to get more explicit information about the release such as the button number. See MEvent for more information.
[in] | event | The button release event information. |
[in] | drawMgr | The UI draw manager, it can be used to draw some simple geometry including text. |
[in] | context | Frame level context information |
Reimplemented from MPxContext.
|
virtual |
This method is not available in Python.
This method is called when a mouse drag event occurs.
The base method does nothing and should be overridden if the user needs to do anything during a mouse drag.
MUIDrawManager allows for drawing primitives in the 3D modeling space. Those primitives will then be projected onto a 2D overlay plane before being displayed.
The event can be used to get more explicit information about the drag such as the cursor location. See MEvent for more information.
[in] | event | The button drag event information. |
[in] | drawMgr | The UI draw manager, it can be used to draw some simple geometry including text. |
[in] | context | Frame level context information |
Reimplemented from MPxContext.
|
virtual |
This method is not available in Python.
This method is called when a mouse button is moving.
The base method does nothing and should be overridden if the user needs to do anything on a button hold.
MUIDrawManager allows for drawing primitives in the 3D modeling space. Those primitives will then be projected onto a 2D overlay plane before being displayed.
The event can be used to get more explicit information about the hold such as the button number. See MEvent for more information.
[in] | event | The mouse moving event information. |
[in] | drawMgr | The UI draw manager, it can be used to draw some simple geometry including text. |
[in] | context | Frame level context information |
Reimplemented from MPxContext.
void viewToPort | ( | double | xView, |
double | yView, | ||
short & | xPort, | ||
short & | yPort | ||
) | const |
This method is used to convert view coordinates to port (window) coordinates.
[in] | xView | the x position at view coordinate |
[in] | yView | the y position at view coordinate |
[out] | xPort | the x position at window coordinate |
[out] | yPort | the y position at window coordinate |
void portToView | ( | short | xPort, |
short | yPort, | ||
double & | xView, | ||
double & | yView | ||
) | const |
This method is used to convert port (window) coordinates to view coordinates.
[in] | xPort | The x position at window coordinate |
[in] | yPort | The y position at window coordinate |
[out] | xView | The x position at view coordinate |
[out] | yView | The y position at view coordinate |
void viewRect | ( | double & | left, |
double & | right, | ||
double & | bottom, | ||
double & | top | ||
) | const |
This method is used to get the current uv viewport dimensions.
[out] | left | Left coordinate of uv viewport. |
[out] | right | Right coordinate of uv viewport. |
[out] | bottom | Bottom coordinate of uv viewport. |
[out] | top | Top coordinate of uv viewport. |
void portSize | ( | double & | width, |
double & | height | ||
) | const |
This method is used to get the window dimension of the current uv viewport.
[out] | width | Width of the window. |
[out] | height | Height of the window. |
|
static |
This method is called when the user performs a selection within the uv editor.
[in] | xMin | Minimum x coordinate value of the selection rectangle. |
[in] | yMin | Minimum y coordinate value of the selection rectangle. |
[in] | xMax | Maximum x coordinate value of the selection rectangle. |
[in] | yMax | Maximum y coordinate value of the selection rectangle. |
[in] | mask | The selection mask. |
[in] | bPickSingle | Indicate if the user is in single selection mode. |
[in] | bIgnoreSelectionMode | If true, the user can select components even if component selection mode is not on. |
[out] | selectionList | The selection list to be populated. |
|
static |
Returns the name of this class.
|
virtual |
Create a new instance of the tool command associated with this context.
The tool command (derived from MPxToolCommand) is the command that was registered along with the context command in :
Reimplemented from MPxContext.