User forums
 
 FAQFAQ   SearchSearch   RegisterRegister   Log inLog in 

launching MagpiePro -prompt from Maya

 
Post new topic   Reply to topic     Forum Index -> Scripting
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Tue Jun 21, 2005 7:26 am    Post subject: launching MagpiePro -prompt from Maya Reply with quote

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: 293

PostPosted: Tue Jun 21, 2005 3:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
ompalumpa
Guest





PostPosted: Tue Jun 21, 2005 10:57 pm    Post subject: Reply with quote

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





PostPosted: Tue Jun 21, 2005 11:03 pm    Post subject: Reply with quote

Hi - got this one sorted - my back slashes needed to be forward slashes -
Back to top
miguelg
Site Admin


Joined: 06 Feb 2004
Posts: 293

PostPosted: Tue Jun 21, 2005 11:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
ompalumpa
Guest





PostPosted: Wed Jun 22, 2005 11:16 pm    Post subject: stop window to select file "mybatch.txt" Reply with quote

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: 293

PostPosted: Thu Jun 23, 2005 2:05 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Scripting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group