Home Technical Talk

Maya simple MEL script Toggle

polycounter lvl 15
Offline / Send Message
Autocon polycounter lvl 15
So I feel dumb for forgetting most of the MEL scripting I learned in school when I want to do something as simple as creating a hotkey that can toggle between two commands.

I basiclly want to be able to toggle between the mesh smooth effect in Maya on and off. So thats the low quality mode and high quality mode.

Seems like it should be a simple if/else command but I cannot recall how to do these correctly anymore to get one key stroke to toggle between two things.



In case it makes it eaiser the command for High and Low quality mode is

subdivDisplaySmoothness -smoothness 1;
subdivDisplaySmoothness -smoothness 3;

Thanks!

Replies

Sign In or Register to comment.