Python API 2.0 Reference
OpenMayaUI.MPxManipContainer Class Reference
+ Inheritance diagram for OpenMayaUI.MPxManipContainer:

Public Member Functions

def __init__ ()
 
def addCircleSweepManip ()
 
def addCurveSegmentManip ()
 
def addDirectionManip ()
 
def addDiscManip ()
 
def addDistanceManip ()
 
def addFreePointTriadManip ()
 
def addMPxManipulatorNode ()
 
def addManipToPlugConversion ()
 
def addPlugToInViewEditor ()
 
def addPlugToManipConversion ()
 
def addPointOnCurveManip ()
 
def addPointOnSurfaceManip ()
 
def addRotateManip ()
 
def addScaleManip ()
 
def addStateManip ()
 
def addToggleManip ()
 
def connectToDependNode ()
 
def createChildren ()
 
def doDrag ()
 
def doPress ()
 
def doRelease ()
 
def draw ()
 
def drawUI ()
 
def finishAddingManips ()
 
def getConverterManipDoubleValue ()
 
def getConverterManipMEulerRotationValue ()
 
def getConverterManipMMatrixValue ()
 
def getConverterManipMPointValue ()
 
def getConverterManipMTransformationMatrixValue ()
 
def getConverterManipMVectorValue ()
 
def getConverterManipUIntValue ()
 
def getConverterManipValues ()
 
def getConverterPlugDoubleValue ()
 
def getConverterPlugMEulerRotationValue ()
 
def getConverterPlugMMatrixValue ()
 
def getConverterPlugMPointValue ()
 
def getConverterPlugMVectorValue ()
 
def getConverterPlugValues ()
 
def isManipActive ()
 
def manipToPlugConversion ()
 
def plugToManipConversion ()
 
def preDrawUI ()
 
- Public Member Functions inherited from OpenMaya.MPxNode
def __init__ ()
 
def addExternalContentForFileAttr ()
 
def compute ()
 
def configCache ()
 
def connectionBroken ()
 
def connectionMade ()
 
def copyInternalData ()
 
def dependsOn ()
 
def doNotWrite ()
 
def existWithoutInConnections ()
 
def existWithoutOutConnections ()
 
def forceCache ()
 
def getCacheSetup ()
 
def getExternalContent ()
 
def getFilesToArchive ()
 
def getInternalValue ()
 
def getInternalValueInContext ()
 
def hasInvalidationRangeTransformation ()
 
def internalArrayCount ()
 
def isAbstractClass ()
 
def isPassiveOutput ()
 
def legalConnection ()
 
def legalDisconnection ()
 
def name ()
 
def passThroughToMany ()
 
def passThroughToOne ()
 
def postConstructor ()
 
def postEvaluation ()
 
def preEvaluation ()
 
def setDependentsDirty ()
 
def setDoNotWrite ()
 
def setExistWithoutInConnections ()
 
def setExistWithoutOutConnections ()
 
def setExternalContent ()
 
def setExternalContentForFileAttr ()
 
def setInternalValue ()
 
def setInternalValueInContext ()
 
def setMPSafe ()
 
def shouldSave ()
 
def thisMObject ()
 
def transformInvalidationRange ()
 
def type ()
 
def typeId ()
 
def typeName ()
 

Static Public Member Functions

def __new__ ()
 
def addToManipConnectTable ()
 
def initialize ()
 
def newManipulator ()
 
def removeFromManipConnectTable ()
 
- Static Public Member Functions inherited from OpenMaya.MPxNode
def __new__ ()
 
def addAttribute ()
 
def attributeAffects ()
 
def inheritAttributesFrom ()
 

Additional Inherited Members

- Static Public Attributes inherited from OpenMaya.MPxNode
int kAssembly = 22
 
int kBlendShape = 25
 
int kCameraSetNode = 16
 
int kClientDeviceNode = 20
 
int kConstraintNode = 17
 
int kDeformerNode = 2
 
int kDependNode = 0
 
int kEmitterNode = 6
 
int kEvaluatedDirectly = 1
 
int kEvaluatedIndirectly = 0
 
int kFieldNode = 5
 
int kFluidEmitterNode = 13
 
int kGeometryFilter = 24
 
int kHardwareShader = 9
 
int kHwShaderNode = 10
 
int kIkSolverNode = 8
 
int kImagePlaneNode = 14
 
int kLast = 26
 
int kLeaveDirty = 2
 
int kLocatorNode = 1
 
int kManipContainer = 3
 
int kManipulatorNode = 18
 
int kMotionPathNode = 19
 
int kObjectSet = 12
 
int kParticleAttributeMapperNode = 15
 
int kPostEvaluationTypeLast = 3
 
int kSkinCluster = 23
 
int kSpringNode = 7
 
int kSurfaceShape = 4
 
int kThreadedDeviceNode = 21
 
int kTransformNode = 11
 

Detailed Description

Parent class of all user defined manipulators.

Method resolution order:
-   MPxManipContainer
-   OpenMaya.MPxNode
-   builtins.object

Constructor & Destructor Documentation

def OpenMayaUI.MPxManipContainer.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMayaUI.MPxManipContainer.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaUI.MPxManipContainer.addCircleSweepManip ( )
addCircleSweepManip(manipName, angleName) -> MDagPath

This method creates a CircleSweepManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* angleName (string) angle name

Returns the new CircleSweepManip
def OpenMayaUI.MPxManipContainer.addCurveSegmentManip ( )
addCurveSegmentManip(manipName, startParamName, endParamName ) -> MDagPath

This method creates a CurveSegmentManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* startParamName (string) start param name
* endParamName (string) end param name

Returns the new CurveSegmentManip
def OpenMayaUI.MPxManipContainer.addDirectionManip ( )
addDirectionManip(manipName, directionName) -> MDagPath

This method creates a DirectionManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* directionName (string) direction name

Returns the new DirectionManip
def OpenMayaUI.MPxManipContainer.addDiscManip ( )
addDiscManip(manipName, angleName) -> MDagPath

This method creates a DiscManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* angleName (string) angle name

Returns the new DiscManip
def OpenMayaUI.MPxManipContainer.addDistanceManip ( )
addDistanceManip(manipName, distanceName) -> MDagPath

This method creates a DistanceManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* distanceName (string) distance name

Returns the new DistanceManip
def OpenMayaUI.MPxManipContainer.addFreePointTriadManip ( )
addFreePointTriadManip(manipName, pointName) -> MDagPath

This method creates a FreePointTriadManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* pointName (string) point name

Returns the new FreePointTriadManip
def OpenMayaUI.MPxManipContainer.addManipToPlugConversion ( )
addManipToPlugConversion(plug) -> unsigned int

This method adds a manipulator to plug converter for the specified
plug. The converter must be implemented in the manipToPlugConversion()
virtual method of this class.

NOTE: The conversion methods and callback methods of this class should
not be mixed.  The conversion methods are: addManipToPlugConversion(),
addManipToPlugConversion() The callback methods are:
addPlugToManipConversionCallback() addManipToPlugConversionCallback()

* plug (MPlug) - The plug for which the converter is being requested.

Returns the index used to identify the plug inside the
manipToPlugConversion() method.
def OpenMayaUI.MPxManipContainer.addMPxManipulatorNode ( )
addMPxManipulatorNode(manipTypeName, manipName, proxyManip) -> None

This method creates a custom MPxManipulatorNode and adds it to the
MPxManipContainer container.

* manipTypeName (string) manipulator name
* manipName (string) name of the manip
Returns a pointer to the new manipulator
def OpenMayaUI.MPxManipContainer.addPlugToInViewEditor ( )
addPlugToInViewEditor(plug)

Adds a plug to the In-View Editor.

The first such call will cause the In-View Editor to
be displayed automatically with the custom manip.

Should be called from connectToDependNode().

* plug (MPlug) - The plug that the slider should control
def OpenMayaUI.MPxManipContainer.addPlugToManipConversion ( )
addPlugToManipConversion(manipIndex)

This method adds a plug to manipulator converter for the specified
manipulator value (e.g. the start point of a distance manip). The
converter must be implemented in the plugToManipConversion() virtual
method of this class.

NOTE: The conversion methods and callback methods of this class should
not be mixed.  The conversion methods are: addManipToPlugConversion(),
addManipToPlugConversion() The callback methods are:
addPlugToManipConversionCallback() addManipToPlugConversionCallback()

* manipIndex (int) - The index of the manipulator value for which the
converter is being requested. The index is determined by calling the
appropriate method of the manipulator's functionset (e.g.
MFnDistanceManip::startPointIndex).
def OpenMayaUI.MPxManipContainer.addPointOnCurveManip ( )
addPointOnCurveManip(manipName, paramName) -> MDagPath

This method creates a PointOnCurveManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* paramName (string) param name

Returns the new PointOnCurveManip
def OpenMayaUI.MPxManipContainer.addPointOnSurfaceManip ( )
addPointOnSurfaceManip(manipName, paramName) -> MDagPath

This method creates a PointOnSurfaceManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* paramName (string) param name

Returns the new PointOnSurfaceManip
def OpenMayaUI.MPxManipContainer.addRotateManip ( )
addRotateManip(manipName, rotationName) -> MDagPath

This method creates a RotateManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* rotationName (string) name of the rotation vector

Returns the dag path to the new rotate manipulator
def OpenMayaUI.MPxManipContainer.addScaleManip ( )
addScaleManip(manipName, scaleName) -> MDagPath

This method creates a ScaleManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* scaleName (string) name of the scale vector

Returns the dag path to the new scale manipulator
def OpenMayaUI.MPxManipContainer.addStateManip ( )
addStateManip(manipName, stateName) -> MDagPath

This method creates a StateManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* stateName (string) state name

Returns the new StateManip
def OpenMayaUI.MPxManipContainer.addToggleManip ( )
addToggleManip(manipName, toggleName) -> MDagPath

This method creates a ToggleManip and adds it to
the MPxManipContainer container.

* manipName (string) manipulator name
* toggleName (string) toggle name

Returns the new ToggleManip
def OpenMayaUI.MPxManipContainer.addToManipConnectTable ( )
static
addToManipConnectTable( typeId )

This method adds the user defined node as an entry in the
manipConnectTable so that when this node is selected the user can
use the show manip tool to get the user defined manipulator
associated with this node. Note that the name of the manipulator
node has to be the name of the plug-in node appended with 'Manip'.

* mid (MTypeId) - Id of the user defined node
def OpenMayaUI.MPxManipContainer.connectToDependNode ( )
connectToDependNode(node) -> None

This method connects the manipulator to the dependency node. This
is a virtual method and needs to be overridden from the plug-in.

* node (MObject) - the node to which the manipulator should be connected
def OpenMayaUI.MPxManipContainer.createChildren ( )
createChildren() -> None

This method should be overridden in user defined manipulators.
This method is called after the user node derived from
MPxManipContainer is set up.
def OpenMayaUI.MPxManipContainer.doDrag ( )
doDrag() -> None

This method gets called when the manipulator receives a mouse drag event.

Returns None if successful.  Otherwise, returns MStatus.kUnknownParameter
to allow Maya to further process the event.
def OpenMayaUI.MPxManipContainer.doPress ( )
doPress() -> None

This method gets called when the manipulator receives a mouse down event.

Returns None if successful.  Otherwise, returns MStatus.kUnknownParameter
to allow Maya to further process the event.
def OpenMayaUI.MPxManipContainer.doRelease ( )
doRelease() -> None

This method gets called when the manipulator receives a mouse release
event.

Returns None if successful.  Otherwise, returns MStatus.kUnknownParameter
to allow Maya to further process the event.
def OpenMayaUI.MPxManipContainer.draw ( )
draw(view, path, style, status) -> None

This method can be overloaded to customize the drawing of the
child manipulators. If the default draw is also required, this
method should be called from the derived method.

* view (M3dView) - the view in which to draw
* path (MDagPath) - the current path
* style (M3dView.DisplayStyle) - the display appearance
* status (M3dView.DisplayStatus) - the display status
def OpenMayaUI.MPxManipContainer.drawUI ( )
drawUI(drawManager, frameContext) -> None

This is the primary method for doing custom drawing for the
manipulator in Viewport 2.0. All drawing should occur using the
MUIDrawManager and any data cached in preDrawUI(). Raw OpenGL calls
are not supported and if used behaviour will be undefined. Selection
must still be handled in the draw() method, this method is only for
display.

This method is only called when the manipulator needs to be drawn in
Viewport 2.0.

We only need to override this function when we have some custom
elements to draw other than the child manipulators in Viewport 2.0.

This function is empty in this base class.

* drawManager (MUIDrawManager) - The draw manager interface for
                     drawing some simple UI
* frameContext (MFrameContext) - Frame level context information
def OpenMayaUI.MPxManipContainer.finishAddingManips ( )
finishAddingManips()

This method should be called from the user-defined manipulator
plug-in near the end of the connectToDependNode method so that the
converter in the manipulator can be initialized. The converter
cannot be initialized until all the connections from the manip
values to the plug values have been specified.
def OpenMayaUI.MPxManipContainer.getConverterManipDoubleValue ( )
getConverterManipDoubleValue() -> double

This method retrieves the value of a converterManipValue of type
double at a given index from the converter.

* manipIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterManipMEulerRotationValue ( )
getConverterManipMEulerRotationValue() -> MEulereRotation

This method retrieves the value of a converterManipValue of type
MEulerRotation at a given index from the converter.

* manipIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterManipMMatrixValue ( )
getConverterManipMMatrixValue() -> MMatrix

This method retrieves the value of a converterManipValue of type
MMatrix at a given index from the converter.

* manipIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterManipMPointValue ( )
getConverterManipMPointValue() -> MPoint

This method retrieves the value of a converterManipValue of type
MPoint at a given index from the converter.

* manipIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterManipMTransformationMatrixValue ( )
getConverterManipMTransformationMatrixValue() -> MTransformationMatrix

This method retrieves the value of a converterManipValue of type
MTransformationMatrix at a given index from the converter.

* manipIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterManipMVectorValue ( )
getConverterManipMVectorValue() -> MVector

This method retrieves the value of a converterManipValue of type
MVector at a given index from the converter.

* manipIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterManipUIntValue ( )
getConverterManipUIntValue() -> unsigned int

This method retrieves the value of a converterManipValue of type
unsigned int at a given index from the converter.

* manipIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterManipValues ( )
getConverterManipValues() -> [double,double]

This method retrieves the value of a converterManipValue of type
[double, double] at a given index from the converter.

* manipIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterPlugDoubleValue ( )
getConverterPlugDoubleValue() -> double

This method retrieves the value of a converterPlugValue of type
double at a given index from the converter.

* plugIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterPlugMEulerRotationValue ( )
getConverterPlugMEulerRotationValue() -> MEulerRotation

This method retrieves the value of a converterPlugValue of type
MEulerRotation at a given index from the converter.

* plugIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterPlugMMatrixValue ( )
getConverterPlugMMatrixValue() -> MMatrix

This method retrieves the value of a converterPlugValue of type
MMatrix at a given index from the converter.

* plugIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterPlugMPointValue ( )
getConverterPlugMPointValue() -> MPoint

This method retrieves the value of a converterPlugValue of type
MPoint at a given index from the converter.

* plugIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterPlugMVectorValue ( )
getConverterPlugMVectorValue() -> MVector

This method retrieves the value of a converterPlugValue of type
MVector at a given index from the converter.

* plugIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.getConverterPlugValues ( )
getConverterPlugValues() -> [double, double]

This method retrieves the value of a converterPlugValue of type
[double, double] at a given index from the converter.

* plugIndex (unsigned int) - The index of the value
def OpenMayaUI.MPxManipContainer.initialize ( )
static
initialize() -> None

This method initializes the manipulator,
and should be overriden in user-defined manipulators.

Return: Status of the operation.
The base class always returns MS::kSuccess.
def OpenMayaUI.MPxManipContainer.isManipActive ( )
isManipActive(manipName, stateName) -> MDagPath

This method returns if custom manip is active & gets the
current manip object.

* manipType (MFn Type constant) - The type of the custom manip
* manipObject (MObject) - Manipulator object
def OpenMayaUI.MPxManipContainer.manipToPlugConversion ( )
manipToPlugConversion(manipIndex) -> MManipData

This virtual method calculates and returns the requested manipulator
value, based upon the values of plugs on the nodes being manipulated.

To use, call addPlugToManipConversion() for each manipulator value
(e.g. the start point of a distance manip) you want this method to
calculate, then implement this method to calculate those
manipulator values. Each manipulator value is identified by the
unique index returned by the corresponding method of its functionset 
(e.g. MFnDistanceManip::startPointIndex).

* manipIndex (int) - The index of the manipulator value to be
calculated

return
New manipulator value.
def OpenMayaUI.MPxManipContainer.newManipulator ( )
static
newManipulator(manipName) -> (MPxManipContainer, MObject)

This static function is used to create a user-defined manipulator.
The manipObject argument is set to the new manipulator node.
Note that the manipName argument must be the name of a
manipulator derived from MPxManipContainer.
Also note that this method creates the newManipulator,
but doesn't add it to the DAG.
The primary use of this method is in conjunction with
MPxSelectionContext::addManipulator, to add
user-defined manipulators to a context.

Returns a tuple consisting of new MPxManipContainer instance, 
and the manipulator node.

* manipName (string) - manipulator name
def OpenMayaUI.MPxManipContainer.plugToManipConversion ( )
plugToManipConversion(manipIndex) -> MManipData

This virtual method calculates and returns the requested
plug value, based upon the container's manipulator values.

To use, call addManipToPlugConversion() for each plug whose value you
want this method to calculate then implement this method to calculate
those plug values. Each plug is identified by the unique index
returned by the addManipToPlugConversion() call.

plugIndex (int) - The index of the plug value to be calculated

return
New plug value.
def OpenMayaUI.MPxManipContainer.preDrawUI ( )
preDrawUI(view) -> None

This function is used to setup some drawing data for drawing the
manipulator in Viewport 2.0 . The data updated and cached in this
function will be used later during 'drawUI()'.

This method is only called when the manipulator needs to be drawn
in Viewport 2.0.

This method needs only be overridden if custom data is needed for
drawing in drawUI(). If no such data is needed, this method may be
left unimplemented.

This function is empty in this base class.

* view (M3dView) * The view in which to draw
def OpenMayaUI.MPxManipContainer.removeFromManipConnectTable ( )
static
removeFromManipConnectTable( typeId )

This method adds the user defined node as an entry in the
manipConnectTable so that when this node is selected the user can
use the show manip tool to get the user defined manipulator
associated with this node. Note that the name of the manipulator
node has to be the name of the plug-in node appended with 'Manip'.

* mid (MTypeId) - Id of the user defined node