|
Hello,
Does anyone know how to check which nodes in an FBTree object are selected? I’ve tried using attributes of both the FBTree and the FBTreeNode objects. The “Selected” attribute of each always returns False.
Next I’ve tried using the properties of the FBTree object. Some of these properties, such as “Selected”, are inaccessable because when I try to access them with PropertyFind("Selected").Data, I get the following error:
NotImplementedError: Unable to access the data for this type of property.
Lastly, when I try to iterate over an FBTreeNode’s property list, Motionbuilder just crashes.
Anyone had any experience with any of this?
Thanks,
Stev
|
|
|
|
I am strugeling to find the answer to this question as well. Any help would be appreciated!
Also the SelectedCount property gives an weird number every time regardless of what is selected.
The FBEventTreeSelect class should should have a tree node attribute like the FBEventTree class has so at least we could use an OnSelect event then to get the info we need.
|
|
|
|
Got word from Autodesk support that it isn’t possible in Motionbuilder 2009. I guess we’ll have to wait until it is made available.
Stev
|
|
|
|
This poses the ever-important question… then what is the purpose of having the control?
I guess to verify structure, but then why have any selection ability in it?
|
|
|
|
Yeah, Autodesk support did confirm this is on their to do list for next version.
The control itself would be incredibly useful! Sometimes they just overlook certain features when porting over the OpenReality SDK to Python.
I ended up writing my own control class based on the list control. Works like a charm. I was planning to share it sometime soon.
|
|
|
|
In MotionBuilder 2010, you can now get selected tree nodes:
In both ORSDK and Python
FBEventTreeSelect::Data removed
FBEventTreeSelect::TreeNode added
Python Sample updated for testing “Tree.py” (included with the product)
~Kristine
KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn
|
|
|
|
Thanks for the update Kristine :)
|
|
|