AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / Transformation events and callbacks
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

Transformation events and callbacks
Rate this thread
 
31786
 
Permlink of this thread  
avatar
  • Rachlea
  • Posted: 06 July 2009 11:12 PM
  • Total Posts: 22
  • Joined: 09 June 2008 02:35 PM

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



Replies: 0
avatar
  • KxL
  • Posted: 20 July 2009 06:26 PM

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



Replies: 0
avatar

These are available in Python as of MotionBuilder 2010.



KRISTINE MIDDLEMISS | ANIMATION TECHNICAL ARTIST

Replies: 0
avatar
  • vSnappy
  • Posted: 27 June 2012 01:38 AM

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 1in <module>
AttributeErrortype object 'FBAnimationNode' has no attribute 'OnChange'

In contrast when I inspect something like FBSystem().Scene.OnChange, I see the following:

>>> FBSystem().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
http://www.volition-inc.com

Replies: 0
avatar
  • CountZr0
  • Posted: 05 July 2012 05:41 AM

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

Replies: 0