MoBu: FBFindModelByName gone from 2014

Hi,

In Motionbuilder 2012, I used FBFindModelByName a lot in my scripts like this:

myBox = FBFindModelByName(‘LeftForeArmRoll_VectorToNum’)

I’m having issue with FBFindModelByName in Motionbuilder 2014 in that it doesn’t seem to exist anymore.

I have a script that hooks up relation constraints. I use FBFindModelByName to find the boxes inside the constraint. I’ve been trying to use FBFindObjectsByName but am not sure I can use it in this circumstance.

Anyone have any suggestions for a catch-all replacement for FBFindModelByName in MotionBuilder 2014? I use it a ton in my scripts and would love to easily port them to MoBu 2014.

Thanks!


Please disregard the stuff partaining to Relation Constraint Boxes.

I think I found my work around:

cl = FBComponentList()

pattern = ‘LeftForeArmRoll’
FBFindObjectsByName(pattern, cl, False, True)

myObject = cl

print( myObject[0].Name )

I’m definitely interested to hear what others are doing to get around this or if anyone else is dealing with issue.

A simpler way to find joint by name --> ‘LeftForeArmRoll’

jointsList = FBComponentList()
FBFindObjectsByName(‘LeftForeArmRoll’, jointsList, False, True)

print(jointsList[0].Name)

I think FBFindModelByLabelName() should do about what FBFindModelByName used to do

Yep, this seems to work just fine! Much thanks!