mgear.rigbits

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.

Parameters:
  • 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
Returns:

blended joints list

Return type:

list

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

Create one joint for each selected object.

Parameters:
  • 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
Returns:

The New created joint.

Return type:

pyNode

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.

Parameters:
  • oSel (None or blended joint, optional) – If None will use the current selection.
  • *args – Mays’s dummy
Returns:

blended joints list

Return type:

list

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

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

Parameters:
  • 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
Returns:

Description

Return type:

TYPE

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

Connect the locat transformations with inverted values.

Parameters:
  • 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.

Parameters:
  • 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.

Parameters:
  • 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.

Parameters:
  • source (dagNode) – Source dagNode.
  • target (dagNode) – target dagNode.
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.

Parameters:
  • 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.

Parameters:
  • 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
Returns:

The new transformation witht the interpolate matrix o_node applied.

Return type:

pyNode

mgear.rigbits.duplicateSym(*args)

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

mgear.rigbits.matchPosfromBBox(*args)

Match the position usin bounding box of another object another.

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

mgear.rigbits.matchWorldXform(*args)

Align 2 selected objects in world space

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

Replace the shape of one object by another.

Parameters:
  • 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
Returns:

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

Return type:

None

mgear.rigbits.selectDeformers(*args)

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

Parameters:
  • ref (None, optional) – Transform reference
  • space (None, optional) – Space reference
  • *args – Maya dummy
Returns:

Transform

Return type:

pyNode