Area :: Header
Now available for Desktop Subscription customers!
Smoke 2015 Extension 1 brings the LUT Editor and Matchbox to the timeline.
Discussion Groups

Python

Reply
Contributor
Rachlea
Posts: 22
Registered: ‎06-09-2008

Transformation events and callbacks

157 Views, 4 Replies
07-07-2009 03:12 AM
Hi,

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,

Rachlea
Please use plain text.
Distinguished Contributor
_KxL_
Posts: 414
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.

Cheers
Please use plain text.
Mentor
middlek
Posts: 190
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.
KRISTINE MIDDLEMISS | ANIMATION TECHNICAL ARTIST
Please use plain text.
Member
volition
Posts: 4
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
www.dsvolition.com/
Please use plain text.
Valued Contributor
CountZr0_1
Posts: 66
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: http://download.autodesk.com/global/docs/motionbuildersdk2012/en_US/index.html
-jason
Please use plain text.