MTemplateSelectionContext< ContextNameString, ContextClass, NodeType, ManipulatorClass, ManipulatorNodeName > Class Template Reference

MTemplateSelectionContext< ContextNameString, ContextClass, NodeType, ManipulatorClass, ManipulatorNodeName > Class Template Reference

#include <MTemplateManipulator.h>

Class Description

template<const char * ContextNameString, class ContextClass, MFn::Type NodeType, class ManipulatorClass, const char * ManipulatorNodeName>
class MTemplateSelectionContext< ContextNameString, ContextClass, NodeType, ManipulatorClass, ManipulatorNodeName >

Template class for selection context.

Template helper to build selection contexts.

Parameters:
  • ContextNameString : string name of context command
  • ContextClass : context command derived from MPxContextCommand
  • NodeType : MFn type that selection context should operate on
  • ManipulatorClass : derived from MPxManipulatorNode
  • ManipulatorNodeName : name of the manipulator node
+ Examples:
+ Inheritance diagram for MTemplateSelectionContext< ContextNameString, ContextClass, NodeType, ManipulatorClass, ManipulatorNodeName >:

Public Member Functions

 MTemplateSelectionContext ()
 Constructor.
 
virtual ~MTemplateSelectionContext ()
 Destructor.
 
virtual void toolOnSetup (MEvent &event)
 Sets up a active list modified message which will trigger manipulator create/delete operations. More...
 
virtual void toolOffCleanup ()
 Removes the callback.
 
virtual void namesOfAttributes (MStringArray &namesOfAttributes)
 Override to specify which attributes are required on the selected geometry. More...
 
virtual void setInitialState ()
 Override to set manipulator initial state. More...
 
bool validGeometrySelected ()
 Ensure that valid geometry is selected.
 
- Public Member Functions inherited from MPxSelectionContext
 MPxSelectionContext ()
 Class contstructor. More...
 
virtual ~MPxSelectionContext ()
 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 doHold (MEvent &event, 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 after a mouse button is pressed but before the mouse is dragged. More...
 
virtual MStatus helpStateHasChanged (MEvent &)
 This method is called whenever the help state may need to be updated. More...
 
virtual MStatus addManipulator (const MObject &manipulator)
 This method adds a manipulator to the context, and also adds the manipulator to the DAG. More...
 
virtual MStatus deleteManipulators ()
 This method deletes all the manipulators that belong to the context. More...
 
MStatus setAllowPreSelectHilight ()
 This method enables the support of pre-selection highlight for this context. More...
 
MStatus setAllowSoftSelect ()
 This method enables the support of soft selection for this context. More...
 
MStatus setAllowSymmetry ()
 This method enables the support of symmetrical selection for this context. More...
 
MStatus setAllowDoubleClickAction ()
 This method enables the support of double click smart selection for this 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...
 
MStatus getImage (MString &image, ImageIndex index) const
 NO SCRIPT SUPPORT. 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...
 
- Public Member Functions inherited from MPxContext
 MPxContext ()
 Class contstructor. More...
 
virtual ~MPxContext ()
 Default destructor. More...
 
virtual MStatus drawFeedback (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 called when a mouse move event occurs. 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 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...
 
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 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 void updateManipulators (void *data)
 Callback that creates the manipulator if valid geometry is selected. More...
 
- Static Public Member Functions inherited from MPxSelectionContext
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 MPxSelectionContext
bool isSelecting ()
 USE _isSelecting() IN SCRIPT. More...
 
MPoint startPoint ()
 USE _startPoint() IN SCRIPT. More...
 
MPoint lastDragPoint ()
 USE _lastDragPoint() IN SCRIPT. More...
 
virtual MPxToolCommandnewToolCommand ()
 CALL _newToolCommand() IN SCRIPT. 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...
 

Member Function Documentation

virtual void toolOnSetup ( MEvent event)
inlinevirtual

Sets up a active list modified message which will trigger manipulator create/delete operations.

Parameters
[in]eventThe event hat triggered it.

Reimplemented from MPxContext.

virtual void namesOfAttributes ( MStringArray namesOfAttributes)
inlinevirtual

Override to specify which attributes are required on the selected geometry.

Parameters
[in]namesOfAttributesArray of attribute names.
+ Examples:
virtual void setInitialState ( )
inlinevirtual

Override to set manipulator initial state.

Note
manipulatorClassPtr and firstObjectSelected will be set on entry. manipulatorClassPtr is the manipulator created and firstObjectSelected can be used to position the manipulator in the correct position.
+ Examples:
static void updateManipulators ( void *  data)
inlinestatic

Callback that creates the manipulator if valid geometry is selected.

Also removes the manipulator if no geometry is selected. Handles connecting the manipulator to multiply selected nodes.

Parameters
[in]dataPointer to the current context class.

The documentation for this class was generated from the following file:
  • MTemplateManipulator.h