Area :: Header
Discover the Difference with
3ds Max 2015
Upgrade now and save
Discussion Groups

Open Reality

Reply
Contributor
HerrBean
Posts: 15
Registered: ‎11-24-2011

When does FbxRetrieved is called?

35 Views, 2 Replies
01-10-2012 07:40 AM
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.
Please use plain text.
Mentor
middlek
Posts: 190
Registered: ‎08-23-2006

Re: When does FbxRetrieved is called?

01-10-2012 01:10 PM in reply to: HerrBean
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
KRISTINE MIDDLEMISS | ANIMATION TECHNICAL ARTIST
Please use plain text.
Contributor
HerrBean
Posts: 15
Registered: ‎11-24-2011

Re: When does FbxRetrieved is called?

01-11-2012 06:30 AM in reply to: HerrBean
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.
Please use plain text.