Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 25-06-2005 , 12:56 PM
Enivob's Avatar
Registered User
Join Date: Jun 2004
Posts: 3

DoEvents in MEL?

Hi All,

There is a command in Visual Basic called "DoEvents" this allows the system to process normally while you are waiting in a loop. I need Maya to do the same thing.

Consider this code.

Code:
// Wait for an object to be select.

string  $allObjects[];
string  $obj;
select -cl;
$allObjects = `ls -sl -o`;
while (size($allObjects) = 0)
{
	//Wait until we get something in our list
	$allObjects = `ls -sl -o`;
}
print ($allObjects[1] + "\n");
I want to clear the selection then wait for the user to pick an object. But this code locks up Maya because the while is an infinite loop until a selection is made. But because it is an infinite loop, no selection can be made. I need to instruct Maya in the inifnite loop to "Act normally" or "DoEvents" as in Visual basic. Does anyone have a sloution or work around for this?

Thanks,

Enivob

# 2 25-06-2005 , 02:25 PM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
You need to use script jobs for that. Look it up in the manual.


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads