AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Open Reality / When does FbxRetrieved is called?
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

When does FbxRetrieved is called?
Rate this thread
 
63435
 
Permlink of this thread  
avatar
  • HerrBean
  • Posted: 10 January 2012 02:40 AM
  • Total Posts: 15
  • Joined: 23 November 2011 08:46 PM

Hi!

I’ve got a problem to read the additional data I write in the FBX with my plugin.
If I open MB, open my plugin tool, close it and open an FBX, the additional data are retrieved.
But if I open MB and open directly an FBX, the additional data aren’t retrieved.

As if the tool should be instantiated at least once to be activated.
IMHO, it’s a bug. Am I right? Is there a workaround to this problem?

I’m on MotionBuilder 2011 64bits, Windows 7.



Replies: 1
/userdata/avatar/94z4nsx37_KristineLogo88by88.gif

Unfortunatly yes this is an issue, here are some potential workarounds:

One workaround would be to, of course, make the tool visible as specified in a custom layout. However, if the user starts up with a layout that does not include the tool, then FbxRetrieve will not be called unless the tool is made visible and the file is reopened.

Anothr one is to use a class derived from FBUserObject in conjuction with your tool. See the ortoolpersistent sample. By placing an FBUserObject, which has its own FbxStore and FbxRetrieve, in the scene, you can place the data you need in some intermediate place, i.e. the user object, such that when the tool is made visible, it can retrieve the data from the user object. Without the user object, there’s no way to obtain the data from the FBX file until you make your tool visible and you reopen the file (which forces FbxRetreive of your tool to be called).

~Kristine

Author: Kristine Middlemiss

Replied: 10 January 2012 08:10 AM  
avatar
  • HerrBean
  • Posted: 11 January 2012 01:30 AM

Thanks for these explanations, I’ll try that!
I also found another workaround, but user-side so it’s not the best. Ask the users to save their layout after having opened the tool. Next time MB is opened, it instantiates the tool in the background.



Replies: 0