As far as I'm aware, most UI elements in Maya can be added in custom UI windows.
For example, you can create windows with a scene's viewport ("modelEditor"), blend shape editor ("blendShapeEditor") and the node editor ("nodeEditor"). You can arrange them however you want and as many as you want.
But so far I haven't managed to find one that can do the same for a UV editor.
I have found, after a bit of searching, the command "textureWindow" (not the name I was expecting to be honest) that claims to do this exact thing.
But no matter what I do, it doesn't seem to want to create an instance of itself, returning an error.
"// Error: line 1: Unable to create more than one texture window. //"
So, the next thing to logically try is to re-parent the existing one to a new window.
But that doesn't seem to result into anything other than empty windows.
On top of that, I can't be certain that I'm getting the right name of the existing one by using the example found in the documentation of that command.
"getPanel -sty polyTexturePlacementPanel"
This is really confusing. Why is this particular UI element so difficult to work with?
Additionally, after trying a few different possible word combinations, I have accidentally found out that there is a "texturePanel" command.
There is no documentation of it anywhere and I just found out about it. I don't know what arguments it requires and how exactly does it differ from the other one. I will post back here if I figure it out and if it is actually useful.
Until then, I would like to hear your recommendations on this.
Is there a way to create a window with a UV editor/viewer in Maya via MEL?
Replies
{<br> string $inspWindow=`window -title "Inspector Assistant Window" -iconName "Inspector" -width 400 -height 400 "ui_InspectorAssistant_Window_UserInterface#"`;<br> string $inspFrmLay=`formLayout -parent $inspWindow "ui_InspectorAssistant_FormLayout_UserInterface#"`;<br><br> string $txtrExstPnl_Array[]=`getPanel -sty polyTexturePlacementPanel`;<br> string $txtrExstPnl=$txtrExstPnl_Array[0];<br> <br> textureWindow -edit -parent $inspFrmLay $txtrExstPnl;<br> <br> formLayout<br> -edit<br> -attachForm $txtrExstPnl "top" 0<br> -attachForm $txtrExstPnl "left" 0<br> -attachForm $txtrExstPnl "bottom" 0<br> -attachForm $txtrExstPnl "right" 0<br> $inspFrmLay;<br> <br> showWindow $inspWindow;<br>}