Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / FBFindModelByName bug
  RSS 2.0 ATOM  

FBFindModelByName bug
Rate this thread
 
35248
 
Permlink of this thread  
avatar
  • studobbs
  • Posted: 05 October 2009 01:46 PM
  • Location: LA California
  • Total Posts: 4
  • Joined: 22 August 2006 09:21 AM

I have 3 transforms in my scene…

ball:myTransform
cube:myTransform
myTransform

if I iterate through the above list

nodes ('ball:myTransform''cube:myTransform''myTransform')
for node in nodes:
   
obj mb.FBFindModelByName(node)
   
print obj.LongName

result:
ball:myTransform
cube:myTransform
ball:myTransform

the transform that sits outside a namespace is not handled correctly.

s.



Replies: 0
avatar

I am getting the same bug.

from pyfbsdk import FBFindModelByName

lModel 
FBFindModelByName"hips" )
print 
lModel.LongName

del lModel
del FBFindModelByName

returns “dst:hips”



Replies: 0
avatar
  • KxL
  • Posted: 29 November 2010 04:15 AM

Problem is, that you have more than one object that match the name. Function can return only one, so it needs to pick...solution is to use different function:

from pyfbsdk import *

nodes = ('ball:myTransform''cube:myTransform''myTransform')

for 
node in nodes:
 print 
'---Searching for: ' node ' ----'
 
lList FBComponentList()
 
FBFindObjectsByName(node,lList,True,True)
 for 
item in lList:
 print 
item.LongName

Hope this helps.



Replies: 0