// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== global proc PolygonsNormalsMenu(string $parent) // // Description: // Polygon Normals menu // { if (! `isTrue "PolygonsExists"`) return; setParent -m $parent; if (`menu -q -ni $parent` == 0) { string $cmd = "PolygonNormalEditTool"; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewVertexNormalEditTool")) -annotation (getRunTimeCommandAnnotation($cmd)) -image "vertexNormalEdit.png" -command $cmd ; menuItem -optionBox true -label (uiRes("m_PolygonsNormalsMenu.kNewVertexNormalEditBoxOptions")) -annotation (uiRes("m_PolygonsNormalsMenu.kNewVertexNormalEditOptionsAnnot")) -image "vertexNormalEdit.png" -command "PolygonNormalEditTool; toolPropertyWindow" ; menuItem -label (uiRes("m_PolygonsNormalsMenu.kSetVertexNormal")) -annotation (getRunTimeCommandAnnotation("SetVertexNormal")) -image "polySetVertexNormal.png" -command "SetVertexNormal" -dragMenuCommand "performPolySetNormal 2" -dragDoubleClickCommand "SetVertexNormalOptions" ; menuItem -optionBox true -annotation (getRunTimeCommandAnnotation("SetVertexNormalOptions")) -image "polySetVertexNormal.png" -command "SetVertexNormalOptions" ; menuItem -divider true; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewLockNormal")) -annotation (uiRes("m_PolygonsNormalsMenu.kNewLockNormalAnnot")) -image "polyNormalLock.png" -command "polyNormalPerVertex -fn true" ; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewUnlockNormal")) -annotation (uiRes("m_PolygonsNormalsMenu.kNewUnlockNormalAnnot")) -image "polyNormalUnlock.png" -command "polyNormalPerVertex -ufn true" ; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewAverageNormals")) -annotation (getRunTimeCommandAnnotation("AveragePolygonNormals")) -image "polyNormalAverage.png" -command "AveragePolygonNormals" -dragMenuCommand "performPolyAverageNormal 2" -dragDoubleClickCommand "AveragePolygonNormalsOptions" ; menuItem -optionBox true -image "polyNormalAverage.png" -annotation (getRunTimeCommandAnnotation("AveragePolygonNormalsOptions")) -command "AveragePolygonNormalsOptions" ; menuItem -divider true; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewSetToFace")) -annotation (getRunTimeCommandAnnotation("SetToFaceNormals")) -image "polyNormalSetToFace.png" -command "SetToFaceNormals" -dragMenuCommand "performPolySetToFaceNormal 2" -dragDoubleClickCommand "SetToFaceNormalsOptions" ; menuItem -optionBox true -annotation (getRunTimeCommandAnnotation("SetToFaceNormalsOptions")) -image "polyNormalSetToFace.png" -command "SetToFaceNormalsOptions" ; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewReverse")) -annotation (getRunTimeCommandAnnotation("ReversePolygonNormals")) -image "polyNormal.png" -command "ReversePolygonNormals" -dragDoubleClickCommand "ReversePolygonNormalsOptions" ; menuItem -optionBox true -annotation (getRunTimeCommandAnnotation("ReversePolygonNormalsOptions")) -image "polyNormal.png" -command "ReversePolygonNormalsOptions" ; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewConform")) -annotation (getRunTimeCommandAnnotation("ConformPolygonNormals")) -image "polyNormalsConform.png" -command "ConformPolygonNormals" ; menuItem -divider true; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewSoftenEdge")) -annotation (getRunTimeCommandAnnotation("PolygonSoftenHarden")) -image "polySoftEdge.png" -command "SoftPolyEdgeElements 1" ; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewHardenEdge")) -annotation (getRunTimeCommandAnnotation("PolygonSoftenHarden")) -image "polyHardEdge.png" -command "SoftPolyEdgeElements 0" ; menuItem -label (uiRes("m_PolygonsNormalsMenu.kNewSetNormalAngle")) -annotation (getRunTimeCommandAnnotation("PolygonSoftenHarden")) -image "polyNormalSetAngle.png" -command "polySoftEdgeWin" ; setParent -m ..; } }