Home Website Youtube GitHub

Components parented under "leg_3jnt_01", controls get parented under "leg_C0_legBones0_jnt"

Hi!

I have been using mGear for a couple of weeks now and have experimented with creating my own modules to make slight changes to the existing components.

In creating copy of the quadruped hind leg module “leg_3jnt_01”, my program refuses to build any guide parented under that leg module. This means I cannot create a foot under the hind leg, as it does not build the rig.

Is there any fix for this problem? It only seems to occur with “leg_3jnt_01”, as I have made changes to multiple other modules with no problem.

Repro steps:

  1. Create a copy of the “leg_3jnt_01” module in File Explorer and give it a new name
  2. Open the new “guide.py” file and edit the module “TYPE” name to match the new folder name
  3. Open Maya and the mGear “Shifter Guide” and draw the new “Hind Leg” guide
  4. Try to parent any other module under any guide from the “Hind Leg” module
  5. Build the rig and observe how the child module does not build.

As requested I’ve attached a sample module here. All I did was to copy the main “leg_3jnt_01” module (that does work correctly), now it draws in the scene but doesn’t build any children.

Here’s the link to the example module. You might need to request permission
https://drive.google.com/drive/folders/1gsG91ZB_yoSEmvmtHN7Q8pAEzmpHSzuF?usp=sharing

Thank you in advance!

I found the problem. The controllers get built, but parented under the “leg_c0_legBones0_jnt” joints that get hidden.
Still strange that this is the default behavior after copying a module :thinking:

1 Like

Hi. I just wanted to confirm that this issue still exists in 4.1.2 (latest release). Anything parented under the leg_3jnt_01, like the finger on the side of birds, gets an incorrect parent for the ctrls under the “leg_C0_legBones0_jnt”.

  1. If you parent the guides in the same way using an original leg_3jnt_01, do you get different behaviour? Are you sure this has to do with your custom copy?
  2. Can you show a screenshot of your guide hierarchy? What exactly are you parenting under? (The transform node in Maya, not the component name.)
  3. “edit the module TYPE” - Did you also change the NAME? You don’t have to. But if you did, you might have to make some changes in the __init__.py file as well.
1 Like

Hi Chris,

I tested this issue on a stock mgear leg_3jnt_01 module, in the simplest of ways using one leg module, and one chain module parented under it. Also checked with different children modules, and the result was the same.

I see what you mean. This definitely does seem like a bug.

I’ve renamed your topic for clarity.

The controllers get parented under “leg_C0_legBones0_jnt” instead of “leg_C0_root”, like other leg components.

Also if you parent the component under “leg_C0_eff”, it gets parented under “leg_C0_legBones3_jnt”.

Which, by the way “leg_C0_eff” is the correct parenting if you want to include a foot under a leg. Don’t parent under the root. (That doesn’t solve this bug. But keep it in mind when using leg_2jnt_01, for example.)

If you need a short-term workaround right now, I’d recommend parenting your leg and children under a common guide, for example a control_01 hips. And then connect your controls with a post Python script. Especially if this is something custom like a bird wing.

Otherwise, if you are comfortable with Python and the components, I don’t know, but I think the issue might be somewhere around here:

./release/scripts/mgear/shifter_classic_components/leg_3jnt_01/__init__.py
Line 1096 setRelation() method.

    def setRelation(self):
        """Set the relation beetween object from guide to rig"""
        self.relatives["root"] = self.legBones[0]
        self.relatives["knee"] = self.legBones[1]
        self.relatives["ankle"] = self.legBones[2]
        self.relatives["foot"] = self.legBones[3]
        self.relatives["eff"] = self.legBones[3]