If you are using MotionBuilder 2012 and above, you should use the functions FBBeginChangeAllModels() and FBEndChangeAllModels() to accelerate the selection time otherwise the selection might not be smooth like in the UI.
Here is an example:
import time
from pyfbsdk import *
FBBeginChangeAllModels()
s_Time = time.clock()
all_Grp = FBSystem().Scene.Groups
for grp in all_Grp :
for item in grp.Items :
item.Selected = True
e_Time = time.clock()
FBEndChangeAllModels()
print "Select","ProccesTime = %s"%(e_Time - s_Time),"OK"
If now you try the same code without these 2 function calls, you see the difference immediately.

Leave a Reply