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 / fork and exec in MB?
  RSS 2.0 ATOM  

fork and exec in MB?
Rate this thread
 
36599
 
Permlink of this thread   Subscribe to this thread
avatar
  • steebu
  • Posted: 11 November 2009 12:10 PM
  • Total Posts: 42
  • Joined: 09 January 2007 01:40 PM

So I’ve got a script that does random MotionBuilder stuff, and the last thing it should do is run a windows program.  I’ve noticed that if I use os.system() MB hangs and there’s no os.fork(). 

Basically, I just want to fire off an .exe program and still have control in MB.

Anyone have any experience with this?

Thanks!



Replies: 0
avatar
  • sublist
  • Posted: 12 November 2009 04:01 AM

Have you tried to start a *.bat files that starts the *.exe file to get a seperate thread.
Use the DOS “start” command to start the*.exe

That’s the way i do it in maya.
Never tried this with MB



Replies: 0
avatar
  • _stev_
  • Posted: 12 November 2009 09:29 AM

This will allow you to start a process without waiting for it to finish:

import subprocess
subprocess
.Popen('notepad')


Replies: 0




   
  Settings Choose Theme color: