How can I query a joints sao (secondary axis world orientation)? Maya Python -


i want query sao of 1 joint can assign another. in case have managed oj of lowarm via .jot, , i'm trying similar sao.

mc.joint ('l_hand_jnt', e=1, oj=mc.getattr ('l_lowarm_jnt.jot'), sao='yup', zso=1) 

any or advice awesome, thanks!

i don't think joints have 'sao' attribute: flag there allow specify secondary axis when aligning joint because single orientation not provide enough information maya lay out joint: aim constraint need tell maya how solve given target since there infinite number of valid solutions.

you can, however, each 'axis' of joint parsing it's world space matrix or using locators.

if extract world matrix of joint using

worldmat =  cmds.xform(q=true, m=true, ws=true) 

then joint' x axis pointing along world vector worldmat[0:3], local y worldmat[4:7] , local z worldmat[8:11].

if want graphically, create locator, parent joint 1 unit along axis checking, , world position - world position of joint.

i don't think can recover original argument passed sao flag - while joint might still pointing way might not.

you can, of course, stash original sao argmument in custom attribute later retrieval if know you'll want again.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -