mgear.rigbits package



Module contents

mgear.rigbits.addBlendedJoint(oSel=None, compScale=True, blend=0.5, name=None, select=True, *args)

Create and gimmick blended joint

Create a joint that rotate 50% of the selected joint. This operation is done using a pairBlend node.

  • oSel (None or joint, optional) – If None will use the selected joints.

  • compScale (bool, optional) – Set the compScale option of the blended joint. Default is True.

  • blend (float, optional) – blend rotation value

  • name (None, optional) – Name for the blended o_node

  • *args – Maya’s dummy


blended joints list

Return type:


mgear.rigbits.addJnt(obj=False, parent=False, noReplace=False, grp=None, jntName=None, *args)

Create one joint for each selected object.

  • obj (bool or dagNode, optional) – The object to drive the new joint. If False will use the current selection.

  • parent (bool or dagNode, optional) – The parent for the joint. If False will try to parent to jnt_org. If jnt_org doesn’t exist will parent the joint under the obj

  • noReplace (bool, optional) – If True will add the extension “_jnt” to the new joint name

  • grp (pyNode or None, optional) – The set to add the new joint. If none will use “rig_deformers_grp”

  • *args – Maya’s dummy


The New created joint.

Return type:


mgear.rigbits.addNPO(objs=None, *args)

Add a transform node as a neutral pose

Add a transform node as a parent and in the same pose of each of the selected objects. This way neutralize the local transfromation values. NPO stands for “neutral position” terminology from the all mighty Softimage ;)

mgear.rigbits.addSupportJoint(oSel=None, select=True, *args)

Add an extra joint to the blended joint.

This is meant to be use with SDK for game style deformation.

  • oSel (None or blended joint, optional) – If None will use the current selection.

  • *args – Mays’s dummy


blended joints list

Return type:


mgear.rigbits.alignToPointsLoop(points=None, loc=None, name=None, *args)

Create space locator align to the plain define by at less 3 vertex

  • points (None or vertex list, optional) – The reference vertex to align the ref locator

  • loc (None or dagNode, optional) – If none will create a new locator

  • name (None or string, optional) – Name of the new locator

  • *args – Description



Return type:


mgear.rigbits.connectInvertSRT(source, target, srt='srt', axis='xyz')

Connect the locat transformations with inverted values.

  • source (dagNode) – The source driver dagNode

  • target (dagNode) – The target driven dagNode

  • srt (string, optional) – String value for the scale(s), rotate(r), translation(t). Default value is “srt”. Posible values “s”, “r”, “t” or any combination

  • axis (string, optional) – String value for the axis. Default value is “xyz”. Posible values “x”, “y”, “z” or any combination

mgear.rigbits.connectLocalTransform(objects=None, s=True, r=True, t=True, *args)

Connect scale, rotatio and translation.

  • objects (None or list of dagNode, optional) – If None will use the current selection.

  • s (bool, optional) – If True will connect the local scale

  • r (bool, optional) – If True will connect the local rotation

  • t (bool, optional) – If True will connect the local translation

  • *args – Maya’s dummy

mgear.rigbits.connectUserDefinedChannels(source, targets)

Connects the user defined channels

Connects the user defined channels between 2 objects with the same channels. Usually a copy of the same object.

  • source (dagNode) – The dagNode with the source user defined channels

  • targets (list of dagNode) – The list of dagNodes with the same user defined channels to be connected.

mgear.rigbits.connectWorldTransform(source, target)

Connect the source world transform of one object to another object.

  • source (dagNode) – Source dagNode.

  • target (dagNode) – target dagNode.

mgear.rigbits.connect_scale_from_world_matrix(driver, driven)

Set up node connections to make the driven object scale based on the driver object’s world scale matrix. Accepts either str or PyNode.

  • driver (str or pm.nodetypes.Transform) – Name or PyNode of the driver object.

  • driven (str or pm.nodetypes.Transform) – Name or PyNode of the driven object.


>>> connect_scale_from_world_matrix('driver_cube', 'driven_cube')
>>> connect_scale_from_world_matrix(pm.PyNode('driver_cube'),
...                                 pm.PyNode('driven_cube'))
mgear.rigbits.createCTL(type='square', child=False, *args)

Create a control for each selected object.

The newly create control can be parent or child of the object.

  • type (str) – The shape of the control.

  • child (bool) – if True, the control will be created as a child of the object.

mgear.rigbits.createInterpolateTransform(objects=None, blend=0.5, *args)

Create space locator and apply gear_intmatrix_op, to interpolate the his pose between 2 selected objects.

  • objects (None or list of 2 dagNode, optional) – The 2 dagNode to interpolate the transform.

  • blend (float, optional) – The interpolation blend factor.

  • *args – Maya’s dummy


The new transformation witht the interpolate matrix o_node applied.

Return type:



Duplicate one dag hierarchy to/from X/-X renaming “L” to “R”


Match the position usin bounding box of another object another.

Match the position of one object, using the boundig box center of another object.


Align 2 selected objects in world space

mgear.rigbits.replaceShape(source=None, targets=None, *args)

Replace the shape of one object by another.

  • source (None, PyNode) – Source object with the original shape.

  • targets (None, list of pyNode) – Targets object to apply the source shape.

  • *args – Maya’s dummy


Return non if nothing is selected or the source and targets are none

Return type:



Select the deformers from the object skinCluster

mgear.rigbits.spaceJump(ref=None, space=None, *args)

Space Jump gimmick

This function create a local reference space from another space in the hierarchy

  • ref (None, optional) – Transform reference

  • space (None, optional) – Space reference

  • *args – Maya dummy



Return type: