Home Website Youtube GitHub

Leg_3jnt remove unwanted joint

Hello!

I had a question regarding the leg_3jnt. When I build the component it creates a jnt at the end of the chain for the end but also another one on top. Which it does normally.

But I want to get rid of that extra joint because in my case I don’t really need it. I tried to tinker around with the init file but I couldn’t figure it out so far.

Picture as reference

Anyone?? Help please :sob:

Hey,
In the init.py file of the component, you can comment out the following block of code to get rid of the last joint. Don’t know if it can cause any weird issues.

Hey I actually did that and it removes the end joint but I actually want to keep the end joint but remove the joint before. In the screengrab you can see which one I don’t want. But I couldn’t figure it out and still working on it

1 Like

This joint makes more sense when you have multiple joint segments. _3 is the last joint aligned to that limb, and the final segment in the twist. And the end joint has (sometimes? always?) a different orientation, and can be used as an attach point for other things.

If you want to get rid of that extra joint, you could just try making a post Python script. Reparent the End joint, and delete the one you don’t want.

The skin joints should be separated from the rig nodes. So it shouldn’t break anything.

import pymel.core as pm
for side in 'LR':
    endJoint = pm.PyNode(side + '_hindLeg_End')
    lastJoint = pm.PyNode(side + '_hindLeg_3')
    pm.parent(endJoint, lastJoint.getParent())
    pm.delete(lastJoint)

(I hand typed this and didn’t test it.)

(If you do really want to edit the components, I recommend cloning them as unique custom components. This way, you won’t overwrite your changes when you upgrade mGear.)

1 Like

Thanks Chris!

I actually thought about changing the hierarchy in a cs but I wasnt sure if that would break something so I tried to do it the other way. Thank you so much!

1 Like