API Guide > Manipulators >

# Writing a Manipulator

You can create manipulators in the following ways:

- Create a base manipulator on any node in the current scene.
- Create a composite manipulator by adding base manipulators to a manipulator container.
- Create a new type of manipulator node by using the MPxManipulatorNode class and define custom drawing and picking of the manipulator node.

Writing a manipulator involves defining a subclass of the MPxManipContainer class, adding base manipulators to the container manipulator, and defining associations between the manipulator and the attributes on the nodes they affect. Even if your manipulator consists of only one base manipulator, it is necessary to create a container manipulator and add the base manipulator to it.

Container manipulators are composed of one or more base manipulators. When base manipulators are added to a container manipulator, they are referred to as children of the container manipulator, and are added using the MPxManipContainer::createChildren() method.

The association between the manipulator and the corresponding plugs on a node must be defined. The nature of the association between the manipulator and the plugs might be simple or complex. For simple associations, there is a direct correspondence between a manipulator value and the corresponding plug. Conversion functions are used for complex associations.