Maya bug: do/while break/continue

Take the following MEL code in Maya:

 
print("one...\n");
do {
print("two...\n");
break;
print("three...\n");
} while(false);

print("four...\n\n");

…and the result is:

one...
two...

instead of the expected

one...
two...
four...

If you replace the break statement with a continue, it gives the correct result.

Found recently after 10+ yrs of working with Maya :)

Advertisement

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.