Home Website Youtube GitHub

Component and Parent joint index

Hi all,

Great tool! so nice to see some of the gear functions I used to use back in the day in XSI inside Maya.

I do have a question about indexing. I’m working through all the videos, currently 2 hours into the data centric rigging work shop… I keep seeing the component index and parent joint index text fields but I have no idea what they are or why I might need to change the default values. Is there a video that goes through this?


The best way I learned some of these things was just building simple guides and testing multiple duplicates at the same time, using different settings, to see what changed.

  1. Component index is for when you have more than one of something. So if you have a 4-armed monster, then you might want to make the lower arms arm_L1_root.

Or look at the fingers in the default biped template. Instead of “index”, “middle”, “pinky”, etc. you have finger_L0, finger_L1, finger_L2, etc.

Keep in mind that if you change the index, it changes the name of the controls, and you’ll have to edit your synoptic picker to match any new names.

  1. Parent joint index lets you override where in the hierarchy something will get parented. As far as I know, -1 just means “the default first one”. I think if you set it to 0 it would usually do the same thing, maybe depending on your module.

For example, in this image I have parented 2 Control_01 modules under an arm root. Since the joints don’t exist until you build the rig, this is how you tell mGear which joint in the chain it should follow after it gets built.



Thanks for taking the time to reply Chris. Much appreciated.

can you explain a bit for what this will get used? cause afaik it just changes the joint parenting, but the behavior of the rig is gonna be the same…?
i just cant think of a use case. wouldn’t it be also cool if you could indeed make the ctl follow the sub-joint optionally… so your parented component follows the twist of you twist joints for example?

1 Like

Hello @david_s

That is a feature that I am planning to add in the future. Right now is as simple as using a custom step to change the parenting for the control. I did the initial implementation only for joints since is more involved to keep the rotation zeroed use the parent joint index

True… quite simple with a custom step.

Still, was is a use case for having only on the joint hirarchy changed? Im just curios…

Hello ! I’m trying Parent Joint Index solution for parenting things inside a spine, but I get the same thoughts than david, it would be awesome to have another param like “parenting control index”, because for now, the control doesn’t follows the hierarchy.
I have no choice to add custom steps but it would be nice to have a new feature like this in the future :wink:

For those who need, i’ve written a short script to reparent controls in the desired hierarchy:

import maya.cmds as cmds
rootBone = "root"
jointList = ["myBone1", "myBone2"]
for jnt in jointList:
	parentJoint = cmds.listRelatives(jnt, parent=True)
	toParent = None
	for a in [jnt, parentJoint[0]]:
		inMatrix = cmds.listConnections(a, source=True, destination=False, type="mgear_matrixConstraint", exactType=True)
		inMatrix = list(set(inMatrix))[0] if inMatrix else None
		parentControl = cmds.listConnections(inMatrix,  source=True, destination=False, type="transform", exactType=True)
		parentControl = list(set(parentControl))[0] if parentControl else None
		topParentControl = parentControl.replace("jnt_lvl", "root")
		if toParent:
			cmds.parent(toParent, topParentControl)
		for transform in cmds.ls(topParentControl, long=True):
			if not "guide" in transform and rootBone in transform:
				toParent = transform
1 Like