PDA

View Full Version : Permanently delete forms from the UV Texture Editor


DeadlyNightshade
07-31-2012, 09:05 PM
I'm in the process of working on the button layout in the UV-texture editor by editing the textureWindowCreateToolBar.mel -file (and .res.mel -file).

I have no problems adding my own stuff, but I've come to a point where I need to get rid of some of the shit I never use there: such as the LayoutGridUnfoldRelax -form group.

So I thought that I would just comment it out:

/////////////////////////////////
// Layout, Grid, Unfold, Relax //
/////////////////////////////////
setParent ..;



//
// Init hidden/shown option var
//
if (!`optionVar -exists "showStatusAutoAlign"`) {
optionVar -intValue "showStatusAutoAlign" 1;
}

string $toggleAutoAlignCmd = "\"autoAlignLayout\", " +
"\"autoAlignCollapse\", " +
"\"alignCollapse\", " +
"\"showStatusAutoAlignUnfold\")";



//
// Set up open/close bar
//
setUITemplate -pushTemplate TexWinBarTemplate;

iconTextButton -vis true
-parent $gUVTexEditToolBar
-annotation (uiRes("m_textureWindowCreateToolBar.kShowHideLayoutGridUnfoldRelaxAnnot"))
-i1 textureEditorOpenBar.png
-c ("textureWindowCreateToolBar_toggleIcons(-1," + $toggleAutoAlignCmd)
autoAlignCollapse;

setUITemplate -popTemplate;

formLayout autoAlignLayout;

/* ---------------- COMMENT OUT START ------------------
setUITemplate -pushTemplate TexWinButtonTemplate;


iconTextButton
-image1 "layoutUV.png"
-command "ConvertSelectionToFaces; performPolyLayoutUV 0"
-commandRepeatable true -label (uiRes("m_textureWindowCreateToolBar.kSelectFacesToMoveLbl"))
-annotation (uiRes("m_textureWindowCreateToolBar.kSelectFacesToMoveAnnot"))
layoutButton;


popupMenu -button 3
-parent layoutButton
-postMenuCommand "performPolyLayoutUV 1"
layoutButtonPopup;


iconTextButton
-image1 "polySnapUVsToGrid.png"
-command "GridUV"
-commandRepeatable true -label (uiRes("m_textureWindowCreateToolBar.kSnapSelectedUVsToSpecifiedGridLbl"))
-annotation (uiRes("m_textureWindowCreateToolBar.kSnapSelectedUVsToSpecifiedGridAnnot"))
gridUVButton;


popupMenu -button 3
-parent gridUVButton
-postMenuCommand "GridUVOptions"
gridUVPopup;


iconTextButton
-image1 "textureEditorUnfoldUVs.png"
-command "performUnfold 0"
-commandRepeatable true -label (uiRes("m_textureWindowCreateToolBar.kUnfoldLbl"))
-annotation (uiRes("m_textureWindowCreateToolBar.kUnfoldAnnot"))
unfoldUVButton;


popupMenu -button 3
-parent unfoldUVButton
-postMenuCommand "performUnfold 1"
unfoldUVPopup;


iconTextButton
-image1 "relaxUV.png"
-command "performPolyUntangleUV relax 0"
-commandRepeatable true -label (uiRes("m_textureWindowCreateToolBar.kRelaxUVsLbl"))
-annotation (uiRes("m_textureWindowCreateToolBar.kRelaxUVsAnnot"))
relaxButton;


popupMenu -button 3
-parent relaxButton
-postMenuCommand "performPolyUntangleUV relax 1"
relaxButtonPopup;


setUITemplate -popTemplate;


//
// Position icons
//

formLayout -edit


// row 1
-attachForm layoutButton "top" $edgeMargins
-attachForm layoutButton "left" 0


-attachForm gridUVButton "top" $edgeMargins
-attachControl gridUVButton "left" $margin layoutButton


// row 2
-attachControl unfoldUVButton "top" $margin layoutButton
-attachForm unfoldUVButton "left" 0


-attachControl relaxButton "top" $margin gridUVButton
-attachControl relaxButton "left" $margin unfoldUVButton


autoAlignLayout;


*/ ------------- COMMENT OUT END
And while this does remove all the content, I still end up with the slim toggle-button.
Trying to comment out anything earlier results in undeclared variables :/
I might just accept that as a minor nuisance... but I would really like to get rid of it.

CGTalk Moderation
07-31-2012, 09:05 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.