| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue Jun 21, 2005 7:26 am Post subject: launching MagpiePro -prompt from Maya |
|
|
Hello,
I wish to launch "MagpiePro2.exe -prompt" (command line), within Maya, and perform the batch command. I can easily launch it within Maya but I need to add the "dofile("C:/temp/mybatch.txt");" and pick the mybatch.lua file.
using CMD (windows 2000) I'm just currently testing the following:
"C:\Program Files\Third Wish Software & Animation\Magpie Pro\MagpiePro2.exe" -prompt
and it launches file but I'm trying to add the "dofile("C:/temp/mybatch.txt");" - if I can get it working using CMD I'll fine be to add it to Maya.
Please Help
Ompalumpa |
|
| Back to top |
|
 |
miguelg Site Admin

Joined: 06 Feb 2004 Posts: 292
|
Posted: Tue Jun 21, 2005 3:00 pm Post subject: |
|
|
Try saving your lua script to a temporary file and then do
"C:\Program Files\Third Wish Software & Animation\Magpie Pro\MagpiePro2.exe" -prompt <your-lua-script-here>
Miguel |
|
| Back to top |
|
 |
ompalumpa Guest
|
Posted: Tue Jun 21, 2005 10:57 pm Post subject: |
|
|
Hello Miguel,
This is what I'm running from the command line:
"C:\Program Files\Third Wish Software & Animation\Magpie Pro\MagpiePro2.exe" -prompt C:\Temp\mybatch.lua
here's the error:
cannot read C:Tempmybatch.lau: No such file or directory
The "mybatch.lua" works if I run it manually. Please help - I need to get this done today.
ompalumpa |
|
| Back to top |
|
 |
Ompalumpa Guest
|
Posted: Tue Jun 21, 2005 11:03 pm Post subject: |
|
|
| Hi - got this one sorted - my back slashes needed to be forward slashes - |
|
| Back to top |
|
 |
miguelg Site Admin

Joined: 06 Feb 2004 Posts: 292
|
Posted: Tue Jun 21, 2005 11:03 pm Post subject: |
|
|
Ok, are you using bash or some other unix shell instead of the plain old DOS window? I assume you are, please try using forward slashes:
"C:\Program Files\Third Wish Software & Animation\Magpie Pro\MagpiePro2.exe" -prompt C:/Temp/mybatch.lua
If that doesn't work then try double backward slashes and quotes:
"C:\Program Files\Third Wish Software & Animation\Magpie Pro\MagpiePro2.exe" -prompt "C:\\Temp\\mybatch.lua"
Miguel |
|
| Back to top |
|
 |
ompalumpa Guest
|
Posted: Wed Jun 22, 2005 11:16 pm Post subject: stop window to select file "mybatch.txt" |
|
|
Thank you again for your help - I feel stupid about those back slashes!
As I'm launching MagpiePro -prompt within Maya to run "mybatch.lua" I wish to prevent the second window from popping up. As in I would provide the path and file for "mybatch.txt" so the second window doesn't pop up - it just graps it as I have provided it from Maya - I was thinking that I may just add it to the followinig line but I'm not sure if it will work. Do I need to modify the mybatch.lua?
"C:\Program Files\Third Wish Software & Animation\Magpie Pro\MagpiePro2.exe" -prompt C:/Temp/mybatch.lua (maybe add in here with some flags etc or commands....
Please help... |
|
| Back to top |
|
 |
miguelg Site Admin

Joined: 06 Feb 2004 Posts: 292
|
Posted: Thu Jun 23, 2005 2:05 am Post subject: |
|
|
No, to do that you will need to edit your lua script to not put up a file dialog and instead get the filename in another way. For example, you could use a fixed filename and hardcode it into the script, or you can send it from Maya through a file.
Miguel |
|
| Back to top |
|
 |
|