PDA

View Full Version : why does this make maya hang?


jaydru
03-03-2011, 02:14 PM
system("calc");

i just wanna be able to run the calc vai maya hot key, this works but maya hangs untill the calc window is closed

cgbeige
03-03-2011, 03:30 PM
ya, I'm having a similar problem with my UI that launches the VRay Imap viewer. I'd like to know too.

NaughtyNathan
03-03-2011, 04:22 PM
you are passing control to another app... if you simply want to launch a secondary process you could do it like so:
system("load calc");this is all explained pretty thoroughly in the system MEL documentation! ;)

However, "load" is a windows directive, so I'm not sure how you would handle this on a mac..?

:nathaN

jaydru
03-03-2011, 04:33 PM
thank you good sir :applause:

Robert Bateman
03-04-2011, 01:23 AM
However, "load" is a windows directive, so I'm not sure how you would handle this on a mac..?

iirc.

system("calc&")

GiantG
03-04-2011, 10:47 PM
system("start calc") ;)
http://bit.ly/egXfMj

If you wanna do more complex stuff with your OS i recommend to run a batch(*.bat) file

cgbeige
03-04-2011, 11:13 PM
thanks - got it now:

global proc launchImapViewer()
{
string $version = `getApplicationVersionAsFloat`;

if ( `about -mac` )
{
system (("/Applications/ChaosGroup/V-Ray/Maya") + $version + ("-x64/bin/imapviewer.exe &"));
}
else if ( `about -linux64` )
{
system (("/usr/autodesk/maya") + $version + ("-x64/vray/bin/imapviewer.exe &"));
}
else if ( `about -win` )
{
system ("load C\:\\Program\ Files\\Chaos\ Group\\V-Ray\\Maya\ " + $version + ("\ for\ x64\\bin\\imapviewer.exe"));
}
}

CGTalk Moderation
03-04-2011, 11:13 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.