I have made a custom UV editor as some of you might know, and I´m having an issue running it side by side with Maya´s native UV Texture Editor (not literally ofc, as the UV Texture Editor is a singleton).
Before I knew better, I had taken the textureWindowCreateToolBar.mel from Maya´s install directory (under /scripts/others/) and hacked it with my own stuff and placed it in the user script dir.
But now in later versions, I no longer desires that as it overrides the toolbar in the default UV Texture Editor. Instead, I´m using a copy with a different name, like this:
textureWindowCreateToolBar_NSUV.mel
…which I then source from my PyMEL -script.
This works better, but I´m still not fully there. If I start up the native editor then everything is like it should (the default editor is loaded) - without any of my stuff in it.
However, once I start NSUV and textureWindowCreateToolBar_NSUV.mel gets sourced, it also seem to override the native toolbar.
So, closing down NSUV and then opening the native editor, my custom sidebar goes away (as it´s defined in a PyMEL script), but the Maya still thinks that the toolbar from textureWindowCreateToolBar_NSUV.mel should be used instead of textureWindowCreateToolBar.mel in the install dir/scripts/others/
I think this might be due to the fact that the “polyTexturePlacementPanel1” isn´t refreshed/recreated/deleted when the native editor starts. That panel is overrided by NSUV like this:
pm.scriptedPanel(
"polyTexturePlacementPanel1", edit=True,
replacePanel=panelUV,
)
…and then the override just stays (doing a pm.deleteUI(“polyTexturePlacementPanel1” and restarting the native UV texture editor, doesn´t resolve anything. Maya is still using the overridden version)
TL;DR
I need a way of opening up a custom textureWindowCreateToolBar.mel and temporarly overriding the “polyTexturePlacementPanel1” -panel. A way that doesn´t interfere with the native UV Texture Editor.