Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / Merge Callback not working in 2010?
  RSS 2.0 ATOM  

Merge Callback not working in 2010?
Rate this thread
 
36672
 
Permlink of this thread   Subscribe to this thread
avatar
  • csa3d
  • Posted: 13 November 2009 09:08 AM
  • Total Posts: 20
  • Joined: 13 October 2006 04:12 PM

I was wonderng if anyone can confirm whether or not FBApplication().OnFileMerge is actually triggering any callback requests.

I’ve been successful with a bunch of other callbacks, but OnFileMerge appears to not be getting triggered for me.  Can someone else help me take a look at this?

This code for OnFileNew works.  To test, load the code, then do a file, new.  You get the debug printout like you’d expect

import pyfbsdk as fb

def newCallback( obj
evt ):
    print 
"[newCallback] obj: %s, evt: %s" (obj.Nameevt.Type)

app 
fb.FBApplication()
eFileNew 
app.OnFileNew
eFileNew
.Add(newCallback)

This code for OnFileMerge does nothing, and is almost the exact same code you need to trigger it (unless I’m missing something here):

import pyfbsdk as fb

def mergeCallback( obj
evt ):
    print 
"[mergeCallback] obj: %s, evt: %s" (obj.Nameevt.Type)

app 
fb.FBApplication()
eFileMerge 
app.OnFileMerge
eFileMerge
.Add(mergeCallback)

Is there something special about OnFileMerge that I need to do in order to properly trigger it?  Doing a merge from the main file menu does nothing.

-csa



Replies: 0




   
  Settings Choose Theme color: