Cortex  10.0.0-a4
Public Types | Public Member Functions | Static Public Member Functions | List of all members
IECoreMaya::ParameterisedHolderManipContext Class Reference

#include <ParameterisedHolderManipContext.h>

Inherits MPxSelectionContext.

Public Types

enum  Mode { All, First, Targeted }
 

Public Member Functions

void setTarget (MString &plugName)
 
MString getTarget ()
 
void setMode (Mode m)
 Sets the Context's mode to one of the above.
 
Mode getMode ()
 
virtual void toolOnSetup (MEvent &event)
 
virtual void toolOffCleanup ()
 

Static Public Member Functions

static void updateManipulators (void *blindData)
 

Detailed Description

This Class provides a generic manipulator context, that allows Parameters on any node derived from IECore::ParameterisedHolder to be manipulated.

When a node is in the selection, and this context is used as a tool, the selection is recursively walked for supported dependency/DAG nodes. When one is found, its parameters are traversed, and depending on the mode, one or more manipulators are created.

In order for a parameter to display controls, a suitable manipulator must first be registered. This is done in a way similar to Maya's 'Show Manipulator Tool'. The name of registered manipulator should take the following form:

 ie[<manipulatorTypeHint>]<parameterTypeName>ParameterManipulator

The optional manipulatorTypeHint, used for specialisation, is read from the StringData member "manipTypeHint" in the the "UI" CompoundObject of the Parameters userData(), if present.

If the manipulator derives from IECore::ParameterManipulatorContainer then two additional methods are called after creation to specify which parameter the manipulator should target, and wether a label has been specified by the optional StringData member "manipLabel" in the "UI" CompoundObject in the Parameters userData().

See also
ParameterisedManipContainer for more information.

Because it may not be desirable to have all manipulatable parameters display, you may set parameter->userData()["UI"]["disableManip"] to BoolData( true ), and the context will skip that Parameter.

Member Enumeration Documentation

The context supports three modes of operation. These can be managed by the ParameterisedHolderManipContextCmd

See also
ParameterisedHolderManipContextCmd
Enumerator
All 

All Parameters with registered manipulators will display.

First 

The first supported Parameter that is encountered is drawn. (Default)

Targeted 

The attribute name set in the context is drawn, if present.

Member Function Documentation

Mode IECoreMaya::ParameterisedHolderManipContext::getMode ( )
Returns
The Context's current mode.
MString IECoreMaya::ParameterisedHolderManipContext::getTarget ( )
Returns
The Maya attribute name the context is currently operating on.
void IECoreMaya::ParameterisedHolderManipContext::setTarget ( MString &  plugName)

Used to set the target plug name for the context when in Targeted mode.

Parameters
plugNameThe Maya attribute name, without the node prefix. This should be the name of the Parameter plug itself, rather than any children.

The documentation for this class was generated from the following file: