Base Manipulators

 
 
 

Base manipulators are a set of simple manipulators. They operate on data types that range from a single boolean, integer, or floating point value to vectors with floating point values of different lengths.

The OpenMaya API supports the following base manipulator classes that can be combined to form a composite manipulator. All the function sets for the base manipulators are derived from the MFnManip3D class.

The function set classes are used for creating the base manipulators with corresponding create() functions, and to set some properties of the base manipulators. The function set classes are also used to set relationships between values of the manipulator visual controls and values of the attributes (plugs) on nodes. The function set classes communicate with the attributes (plugs) to set their values based on the visual control values.

FreePointTriadManip

The FreePointTriadManip provides a point that can be moved anywhere. It has axes for constrained x, y, and z movement and obeys grid snapping, point snapping, and curve snapping.

The FreePointTriadManip generates the 3D position of a point, which is useful for specifying the position of an object in space.

Note The FreePointTriadManip is a subset of moveManip in Maya.

The MFnFreePointTriadManip class can be used to create the manipulator and set the manipulator properties. For example, MFnFreePointTriadManip::setDrawAxes() can be used to set whether or not to draw the axes, and MFnFreePointTriadManip::setSnapMode() can be used to set whether or not to use the snap mode.

DirectionManip

The DirectionManip allows you to specify a direction as defined by a vector from the start point to the manipulator position. It uses a FreePointTriadManip to specify an end point of the vector relative to a given start point. This manipulator generates a vector from the start point to the end point.

The MFnDirectionManip class can be used to create the manipulator and set the manipulator properties.

DistanceManip

The DistanceManip allows you to manipulate a point that is constrained to move along a line. The distance value is calculated from the start point of the line to the manipulated point. This manipulator generates a single floating point value. Scaling factors can be used to determine how long the manipulator appears when it is drawn.

The API class for DistanceManip is MFnDistanceManip.

PointOnCurveManip

The PointOnCurveManip allows you to manipulate a point that is constrained to move along a curve and specify the u curve parameter value. This manipulator generates a single floating point value corresponding to the curve parameter.

The API class for PointOnCurveManip is MFnPointOnCurveManip.

PointOnSurfaceManip

The PointOnSurfaceManip allows you to manipulate a point that is constrained to move along a surface and specify the (u, v) surface parameter values. This manipulator generates two floating point values corresponding to the surface (u, v) parameters.

The API class for PointOnSurfaceManip is MFnPointOnSurfaceManip.

DiscManip

The DiscManip allows you to rotate a disc to specify a rotation about an axis. This manipulator generates a single floating point value corresponding to the rotation.

The API class for DiscManip is MFnDiscManip.

CircleSweepManip

The CircleSweepManip allows you to manipulate a point constrained to move around a circle and specify a sweep angle. This manipulator generates a single floating point value corresponding to the sweep angle. The CircleSweepManip is similar to the DiscManip, but it provides more options for specifying the rotating angles.

The API class for CircleSweepManip is MFnCircleSweepManip.

ToggleManip

The ToggleManip allows you to switch between two modes or on/off states. It is drawn as a circle with or without a dot. When the mode is on, the dot is drawn in the circle and when the mode is off, the circle is drawn without the dot. This manipulator generates a boolean value corresponding to whether or not the mode is on or off.

The API class for ToggleManip is MFnToggleManip.

StateManip

The StateManip allows you to switch between multiple states. It is drawn as a circle with a notch. Each click on the circle increments the value of the state. This manipulator generates an integer value corresponding to the state of the manipulator.

The API class for StateManip is MFnStateManip.

CurveSegmentManip

The CurveSegmentManip allows you to manipulate two points on a curve to specify a curve segment. This manipulator generates two floating point values, which correspond to the parameters of the start and end of the curve segment.

The API class for CurveSegmentManip is MFnCurveSegmentManip.

RotateManip

The RotateManip corresponds to the built-in rotate manipulator in Maya, and it allows you to manipulate a 3d rotation vector. The manipulator consists of three constrained-axis rotation rings, a view rotation ring, and an invisible trackball that allows you to rotate in arbitrary directions in a sphere. It supports the three rotation modes of the built-in rotate manipulator: object space, global, and gimbal. It allows constrained rotation on the x, y, z, and viewing axes. The vector generated by the manipulator is an Euler rotation that is suitable for input to a rotation plug.

The API class for RotateManip is MFnRotateManip.

ScaleManip

The ScaleManip corresponds to the built-in scale manipulator in Maya, and it allows you to manipulate the relative x, y, and z scaling values. The scale manipulator provides a central handle for proportional scaling, as well as x, y, and z axis handles for non-proportional scaling on each axis. The manipulator generates a relative scaling vector that is suitable for input to a scale plug.

The API class for scaleManip is MFnScaleManip.