In this post we will go over selecting the Character’s hips through python – this method can select any valid body/object within your scene just by replace the search string from “Pelvis” to “the desired objects name“.
I created a post a while back that would allow the user to select the “Selected Character’s” hips/pelvis. For some reason the post had been deleted (let’s chalk it up to human error on my part). Noticing that people are still searching for this post and are getting the dreaded “404 error” I decided to quickly create another post about pelvis selection.
First let’s get our current selected Character’s name space:
lCurrentCharName = FBApplication().CurrentCharacter.LongName.rsplit(':', 2) print lCurrentCharName
Now that we have the Character’s Name Space set up as a callable variable (lCurrentCharName) we can use that as the prefix to our Hips/HipsEffectro/Pelvis object:
# Selecting Hips ''' ":Ctrl:HipsEffector" can and should be replaced with the needed suffix for your scene. You can find the needed name by manually selecing your Character's Hips and then looking in the bottom right hand corner of the view port ''' lCurrentCharHips = FBFindModelByLabelName(lCurrentCharName+":Ctrl:HipsEffector") lCurrentCharHips.Selected = True
I hope this helps.