Area :: Header
Sweat, Swearing & Tears
Cupcakes & Critters reflects on what it takes to bring an indie game to market. Watch now
Discussion Groups


22 Posts
0 Kudos
Registered: ‎06-09-2008

Transformation events and callbacks

186 Views, 4 Replies
07-07-2009 03:12 AM

I would like to know if there is a way to register specific transformation events?

It is possible to add callbacks to FBSystem().Scene that register all the ‘FBSceneChangeType’ events using the ‘OnChange.Add()’ method.

This will register ‘kFBSceneChangeTransactionBegin’ and ‘kFBSceneChangeTransactionEnd’ event types if something is manipulated in the 3d perspective viewer.

There are a number of other interactions that trigger these types of event and I would like to know if a transformation has occurred and ideally which model was involved.

I noticed that there is an FBEventAnimationNodeType class but I have no idea what to add the call back to in order to register occurrences of these types of event.

Cheers for your help,

Distinguished Contributor
414 Posts
9 Kudos
Registered: ‎08-23-2006

Re: Transformation events and callbacks

07-20-2009 10:26 PM in reply to: Rachlea
I can't see a way of doing this in python. In ORSDK you have few more callbacks. What would be ideal is FBSystem.OnConnectionStateNotify.

As for that animation node event, it's also something not exposed, in ORSDK there is FBAnimatioNode.OnChange, but I was never able to make it work how I would like to.

190 Posts
3 Kudos
Registered: ‎08-23-2006

Re: Transformation events and callbacks

03-11-2011 12:03 PM in reply to: Rachlea
These are available in Python as of MotionBuilder 2010.
4 Posts
0 Kudos
Registered: ‎08-22-2006

Re: Transformation events and callbacks

06-27-2012 05:38 AM in reply to: Rachlea
Has anyone gotten the FBAnimationNode.OnChange.Add() to work? I see it in the documentation, but I don't see it in the application Mobu2012 or Mobu2013.
>>> FBAnimationNode.OnChange
Traceback (most recent call last):
File "<MotionBuilder>", line 1, in <module>
AttributeError: type object 'FBAnimationNode' has no attribute 'OnChange'

In contrast when I inspect something like FBSystem&#40;&#41;.Scene.OnChange, I see the following:
>>> FBSystem&#40;&#41;.Scene.OnChange
<callbackframework.FBEventSource object at 0x000000001122FC50>

I'm fairly new to Mobu and using Python in it. Any help would be much appreciated.

Ultimately, what I'm specifically after here (if possible) is to detect when keys are modified on the Camera Switcher.
Kelly Snapka
Principal Artist
Valued Contributor
66 Posts
1 Kudo
Registered: ‎08-22-2006

Re: Transformation events and callbacks

07-05-2012 09:41 AM in reply to: Rachlea
Yep. Looks like a bug in documentation. There is no OnChange attr on FBAnimationNode despite it being listed here: