finding the root joint with child joint selected

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  05 May 2013
Ho, sorry about that, now I read it again, and get how it sounds. I should definitely have expressed myself more clearly.
BFF (even if we hold different opinions, or tease each other).
 
  05 May 2013
that was a huge response, i was surprised just by looking at my inbox filled with cgs replies. thanks a lot people!
anyway like djx suggested, splitting string list with "|" worked well for me and i`m not gona get into pyMel stuff just yet as there are barely any resources on internet about pyMel. if you know anything related to pyMel, please give me the link and i will try to buy it.
thanks again, thanks for the replies!
 
  06 June 2013
cmds.ls(sl =True, l=True)[0].split('|')[1] ----> will give you joint1 when joint9 is selected



or



sel = cmds.ls(sl =True, l=True)[0].split('|')
for i in sel :
    if cmds.ls('|'.join(sel[:sel.index(i)+1]), type='joint') :
        root = i
        print root
        break


will give joint1 when joint9 is selected, even when joint1 is sitting under a group
__________________


Last edited by ftaswin : 06 June 2013 at 12:25 AM.
 
  06 June 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:48 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.