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 / MB 2009: FBTree
  RSS 2.0 ATOM  

MB 2009: FBTree
Rate this thread
 
24698
 
Permlink of this thread  
avatar
  • _stev_
  • Posted: 27 March 2009 01:16 PM
  • Total Posts: 34
  • Joined: 21 May 2007 07:08 PM

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



Replies: 0
avatar
  • Serguei
  • Posted: 11 May 2009 04:40 PM

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.



Replies: 0
avatar
  • _stev_
  • Posted: 01 June 2009 06:20 AM

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



Replies: 0
avatar
  • rhithyn
  • Posted: 16 June 2009 07:50 AM

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?



Replies: 0
avatar
  • Serguei
  • Posted: 16 June 2009 11:51 AM

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.



Replies: 0
avatar

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

Replies: 0
avatar
  • Serguei
  • Posted: 28 September 2009 07:16 AM

Thanks for the update Kristine :)



Replies: 0