Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / Starting MotionBuilder from the command line with flags
  RSS 2.0 ATOM  
2 pages: 1.2 last

Starting MotionBuilder from the command line with flags
Rate this thread
 
14899
 
Permlink of this thread  
avatar
  • Location: Canada
  • Total Posts: 105
  • Joined: 23 August 2006 03:13 PM

Hello,

Just wanted to post some start-up flags that aren’t documented, yet. If your curious why I posted it here and not in the main MB thread, I just feel a lot of the flags are helpful for the coders. The attachement has more details and examples.

-console
This opens an output window used by FBTrace in the OR SDK, where the appropriate stdout/err stream goes. If you choose to use this console output window for Python output you would need to also specify the –verbosePython flag.

-F [filename]
This flag is not necessary to specify a filename, however if you choose to not use it you will always have to have the filename you want to open at startup last in the parameter list.

-g [width] [heigh]
Sets the window size of MotionBuilder to the values you have specified. Default value will be as large as the screen size.

-S
Starts MotionBuilder in Full Screen Mode, this is the same as choosing Display > Full Screen inside the Viewer. To exit out of Full Screen Mode, hit Alt+Enter.

-setAsFrontMostApp
For Macintosh only. When launching MotionBuilder from a terminal, MotionBuilder looses focus to the terminal. This can cause problems when you are trying to automate with scripts. This flag keeps the focus on MotionBuilder and set it as the front most application.

-suspendMessages
Disables all the warnings and dialogs that pop-up. This flag is useful for automation purposes when you do not want the script to be interrupted by dialog boxes. By default all warnings and dialogs boxes are shown.

-T[UI Name]
Finds a tool with the matching name among the tools that MotionBuilder has registered, and if it is found it activates it. This flag parameter is case sensitive. Also note there is not space between the flag name and the UI Name parameter unlike the other flags.

-verbosePython
Outputs all python messages to the appropriate stdout/err stream. This puts the Python print messages to the window that you activate using the console flag as well as to the Python Editor, this is the same location that FBTrace outputs to when using the OR SDK. By default we do not output python output to stdout/err only to the Python Editor.

Enjoy!,

Kristine



KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn

Attachment Attachment
Replies: 0
avatar
  • KxL
  • Posted: 08 September 2008 03:43 AM

Thank you Kristine, those informations are very useful...I am supprised that only I am happy seeing this ?



Replies: 0
avatar

No problem, sercret information doesn’t help the learning curve ;)



KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn

Replies: 0
avatar
  • CountZr0
  • Posted: 08 September 2008 11:35 AM

This is very good news indeed. Crucial for batch processing with Python and MoBu.



-jason

Replies: 0
avatar
  • Serguei
  • Posted: 23 February 2009 09:53 PM

I can’t seem to get python output in the console even with the verbosePython flag. Any ideas why?

Edit: It seems like I need to launch the python editor inside motionbuilder for the console to initialize, because as soon as I do it it dumps the expected output to the console.



Replies: 0
avatar

Hello,

I was able to get all my printed information to come to the console by starting MotionBuilder like this:

“C:\Program Files\Autodesk\MotionBuilder 2009\bin\win32\motionbuilder.exe” -console -verbosePython

I tried what you said and closed the Python Editor and ran a script that had output and also errored, and all of this information went to the console, I did not have to wait to open the Python Editor to have it be sent to the console,

I hope I understand the issue you are having correctly,

Kristine



KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn

Replies: 0
avatar
  • Serguei
  • Posted: 24 February 2009 12:26 PM

Hi Kristine,
Could you try running a script that errors or has outputs at startup. Something like:

“C:\Program Files\Autodesk\MotionBuilder 2009\bin\win32\motionbuilder.exe” -console -verbosePython "Test.py"

In this case I need to open the Python Editor before it dumps my output into the console.
Thanks.



Replies: 0
avatar

Oh yes, I do see what you mean this is a problem I will log a bug for you on this,

~Kristine



KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn

Replies: 1
/img/forum/dark/default_avatar.png

1.5 year later, im in MotionBuilder 2010 and I’m still having this issue with no Python output in the console even when using -console -verbosePython.
And same here, I have to open the Python Editor for it to work properly.
Will this ever by fixed or not? thanks!

Author: SuperOli

Replied: 29 October 2010 07:41 AM  
avatar
  • Serguei
  • Posted: 24 February 2009 05:08 PM

Thanks. In the meantime using the “-TPython Editor” flag to pop up the editor on start up works.
Btw is there a way to run MotionBuilder with only the console showing?



Replies: 0
avatar

Ahh, that’s a good workaround, nice thinking!  Console only: unfortunately not, you have to have the MotionBuilder application running to be able to do anything, there is no batch or prompt mode like Maya, the reasoning for this has to do with it being a real time package so you have to have it open to do real time.



KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn

Replies: 0
avatar

But what some people do is put MotionBuilder on another computer and using telnet send it Python commands…



KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn

Replies: 0
avatar

Will this work for MB 7.5 EXT 2???



Replies: 0
avatar

Hello,

I am not sure which point your asking about, so I will go with the last thread, and say yes telnet will work in 7.5 Ext 2.



KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn

Replies: 0
avatar

Can this be used with MB 7.5 Ext 2

-console
This opens an output window used by FBTrace in the OR SDK, where the appropriate stdout/err stream goes. If you choose to use this console output window for Python output you would need to also specify the –verbosePython flag.

or any of the start up flags



Replies: 0
avatar

-console flag is new in 2009. In 7.5 you need to set the environment variable FILMBOX_CONSOLE to 1 to make it appear, but once you set that, then when I tested with the -verbosePython flag it works, so as far as I see yes everything but -console works in 7.5 Ext 2.



KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn

Replies: 0
avatar

<3



Replies: 0
2 pages: 1.2 last