View Full Version : Opposite of Prompt?


lwrath
12 December 2012, 01:44 AM
using a prompt or similar dialog maya pauses until you feed a UI some input.

what I would like to do is the exact opposite and make my script pause while I do some work in maya until I click "continue" in a UI.

how would I do that?

lwrath
12 December 2012, 01:46 AM
I would also like to do this even inside of a loop, just make it wait till I tell it to continue.

Nyro
12 December 2012, 11:19 AM
It's not possible just like that.

While Maya is running/evaluating your script, particularly the for-loop, it sets its state to "busy". That means it never enters its idle state, which is necessary for you to be able to interact with it.

A possible solution would be to separate your job into 2 procedures:

the first procedure runs the for-loop until some condition is met, upon which it breaks the loop and stores whatever necessary values it needs later on in a global variable. Or you could create a scriptJob to take up where the first procedure left off.
In either case you need a second procedure that can be called when you are "done doing your work in Maya" that retreives the values previously stored and continues doing something with them.

DeadlyNightshade
12 December 2012, 03:21 PM
Not possible afaik - there is no MEL "stop"-command.

CGTalk Moderation
12 December 2012, 03:21 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.


1