MotionBuilder 2022 - Python "Send To Maya"

I’m trying to look for the Python command in MotionBuilder that sends items over to Maya via the File - Send to Maya option from the menu’s. In Maya I can see that Send To Motion builder is mel "OneClickMenuExecute(“MotionBuilder”, “UpdateCurrentScene”);

I’ve been searching and only seem to find the same question with no answers. Has anyone found a way to do this with Python?

Thanks!

This looks like it, in the FBApplication class:
https://help.autodesk.com/view/MOBPRO/2022/ENU/?guid=MotionBuilder_SDK_cpp_ref_class_f_b_application_html

https://help.autodesk.com/view/MOBPRO/2022/ENU/?guid=MotionBuilder_SDK_py_ref_class_f_b_application_html

1 Like

Wow, thank you! I need at least 20 characters so, you are awesome too. :smiley:

No worries - glad to help!

I’m back with another question. :slight_smile: I’m not entirely sure how to run this. I get an instant crash. In this case what would be (FBApplication)arg1 in,
OneClickAddToCurrentScene( (FBApplication)arg1) -> bool

Docs: Help

app = FBApplication()
app.OneClickAddToCurrentScene()

Sorry - I missed your reply, you need to specify which application:
https://help.autodesk.com/view/MOBPRO/2022/ENU/?guid=MotionBuilder_SDK_cpp_ref_fbapplication_8h_html

From my understanding of the docs, you need to send a new scene first:

import pyfbsdk as mb_py
app = mb_py.FBApplication()
app.OneClickSendAsNewScene(mb_py.FBOneClickApplication.kFBOneClick3dsMax)

Though this causes a crash for me in 2022 too, so I think it is bugged :frowning:

Hey guys,
Did anyone find a solution for this issue? I am getting instant crash too.

I get the same thing. I noticed there’s a motion builder update but I haven’t tried since.