Home Website Youtube GitHub

[Solved] Wrist rotation control won't freeze transform

Hello mGear community! I’m new here and trying to learn mGear. 3.60

I have set up a biped rig using the biped template from shifter.

Once I place then guides and build skeleton. The wrist rotation controls are not freeze transformed.
This is with IK wrist which controls rotation and translation for wrist.

After building rig from guides the rotation channel has values and I want them to be 0.

Please let me know if there’s a solution for this. Thank you

Hi welcome,

First of all, understand that there is a difference between zeroing out a control, and “freeze transforming” a control. I don’t recommend freezing any controls.

arm_L0_ikcns_ctl is world-aligned by default. You can fix this in a post Python script if you like.

This script aligns the parent of arm_L0_ik_ctl to match. Then adds another zero-out parent to arm_L0_ikcns_ctl to zero it out.

import pymel.core as pm
from mgear.core import transform
from mgear import rigbits

def fix_ik_hand_orientation(side):
    ikCns = pm.PyNode('arm_{}0_ikcns_ctl'.format(side))
    ikCtrl = pm.PyNode('arm_{}0_ik_ctl'.format(side))
    handChildren = ikCtrl.getChildren(type='transform')
    
    transform.matchWorldTransform(ikCtrl, ikCns)
    transform.matchWorldTransform(ikCns, ikCtrl)
    zeroOut = rigbits.addNPO(ikCns)[0]
    zeroOut.rename('arm_{}0_ikcns_zero'.format(side))
    
for side in 'LR':
    fix_ik_hand_orientation(side)
2 Likes

Thank you so much Chrislesage! :star_struck:

The script worked. I was doing it manually earlier, but this saves so much time. You’re the best!

Newbies to scripting. Add the line below at the top of the script for it to work.

import pymel.core as pm

1 Like

Ah yes, thanks, edited that!

1 Like