MEL script disappears after execute

MEL script disappears after execute

patrick8CTF6
Enthusiast Enthusiast
549 Views
3 Replies
Message 1 of 4

MEL script disappears after execute

patrick8CTF6
Enthusiast
Enthusiast

Super NOOB question, I'm sure.

 

How to stop Maya from erasing the MEL script I'm working on when executing? 

 

I can just keep copying and pasting from Notepad, but is there a setting to stop Maya from clearing the slate every time I run the script?

0 Likes
Accepted solutions (1)
550 Views
3 Replies
Replies (3)
Message 2 of 4

brentmc
Autodesk
Autodesk
Accepted solution

Hi,

Yes, this is a weird historic quirk of Maya. The trick is to either:

1) save the script to a file (which prevents Maya from deleting the script after running)

2) select the script before running. e.g. Ctrl-A, Ctrl-Return

Note: in the case where Maya deletes the script you can use undo (Ctrl-Z) to get it back.

Brent McPherson
Principle Engineer
Message 3 of 4

patrick8CTF6
Enthusiast
Enthusiast

Awesome. Thanks @brentmc !

0 Likes
Message 4 of 4

doom7787
Explorer
Explorer

I found a better solution , just in the end of your code add an error comand , somthing like " parent execute cancle" (MEL), maya builded in a way it wont remove your code if its cant complete it , by making that little error it will block your maya from clear your code or move you to somewhere like after Ctrl +Z , just make sure its the end of the code so it wont stop it in the middle