OK, here’s a question for Maya MEL scripters.
I’ve written a script which does some heavy editing of UVs and vertices, which if run when only a 2d/3d model view is visible, runs really fast.
As soon as the UV Texture Editor window is visible, the script slows down hugely, because Maya feels the need to refresh the selection on every change in the UV view (something which it doesn’t do in other viewports).
So what I want my script to do is detect if the UV panel is open/visible (I already know how to do this, and that’s ok), but then it should either “disable update/refresh” in the UV panel, or hide/replace the UV panel until the script is done, then show it again if it was visible in the first place.
So far all the methods I’ve tried for removing it (un-managing the parent panel, using the removeTextureWindow proc, some other hacky techniques) all result in unsatisfactory end user experience. Most of the time if I un-manage or otherwise hide the window, when I put it back again after the script is run, it doesn’t update properly. Either it doesn’t respond to any input at all until you tear it off and re-dock it, or it displays properly but only in the portion of the screen that was visible before it was hidden (so increasing the panel size has no effect, the drawn region of UV editor stays the same).
In Maxscript all I had to do for a similar result was prefix my script “with redraw off”, and all was well. I haven’t found anything nearly as simple in MEL yet, hopefully someone can shed some light on this?
Cheers!