PDA

View Full Version : progressWindow problem


sagmam
07-02-2004, 08:12 PM
Hi all,
I'm writing a mel script that adds some influence objects to my model. I call the following command in a loop:

skinClusterInfluence 1 "-ug -dr 4 -ps 10 -ns 10";

This function takes a long time to do and all of Maya almost stops responding during that time, so I wanted to display a progress window. Anyway, after the first iteration, the progressWindow stopped updating. Only the trace message that I put in the script continue to show progess.

Basically, my loop is something like this:
1. show trace message
2. add influence object
3. update the progress window (-e -status $msg -pr $progress)
4. pause for 1 sec

If I COMMENT OUT #2, then the progress window updates - no problem. How do I make the progressWindow update in this case? What's the point of a progressWindow if I can't use it especially when Maya performs heavy operations??? Is there some kind of command that FORCES Maya to update its GUI?? Maybe I can use it here...

thanks.

mhovland
07-03-2004, 11:55 AM
What happens if you remove the pause from your code, and leave the rest?

sagmam
07-03-2004, 04:39 PM
Hehe, I only added the pause command because I thought it would give the GUI time to update itself...it didn't work :-) Without the pause, it's the same.

DanNeufeldt
07-25-2004, 11:18 PM
try using

progressWindow -e -step 1;

each time the loop iterates.
this updates the progress window by one unit.
when you first create the window set the max to the number of iterations
progressWindow -max $yourmax; etc.

I had that same problem one time, and using the -step command made the window update correctly.

CGTalk Moderation
01-18-2006, 03:00 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.