// =========================================================================== // 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. // =========================================================================== // // // Creation Date: 17 June 2014 // // // Procedure Name: // ModelingUVMenu // // Description: // Create the MODELING->UV menu // // Input Arguments: // Parent window that menu will be a part of. // // Return Value: // None. // global proc ModelingUVMenu ( string $parent ) // // Description: // Modeling UV menu // { if (! `isTrue "PolygonsExists"`) return; setParent -m $parent; if( `menu -q -ni $parent` != 0 ) { // // Menu is built already - just return // return; } menuItem -version 2018 -enableCommandRepeat false -rtc "TextureViewWindow" ; menuItem -enableCommandRepeat true -rtc "UVSetEditor" ; // Create Section menuItem -divider true -dividerLabel (uiRes("m_ModelingUVMenu.kCreateDivider")); menuItem -enableCommandRepeat false -checkBox false -dragMenuCommand "polygonUVsItemToShelf \"togglePolyCreateShaderWithMapping\"" -rtc "TogglePolyUVsCreateShader" toggleCreateShaderItem ; menuItem -divider true -ld false; menuItem -rtc "UVAutomaticProjection" -ddc "UVAutomaticProjectionOptions 1" ; menuItem -optionBox 1 -annotation (getRunTimeCommandAnnotation("UVAutomaticProjectionOptions")) -command "UVAutomaticProjectionOptions" -enableCommandRepeat false -image "polyAutoProjLarge.png" ; menuItem -version "2018" -enableCommandRepeat true -dragMenuCommand "polygonsMenuItemToShelf \"BestPlaneTexturingTool\"" -rtc "BestPlaneTexturingTool" polyBestPlaneTexturingItem ; menuItem -enableCommandRepeat true -dragMenuCommand ("performPolyForceUVArgList \"1\" {\"2\", \"camera\", \"ls -selection\", \"0\"} \"\";") -rtc "UVCameraBasedProjection" -ddc "UVCameraBasedProjectionOptions" cameraProjectionItem ; menuItem -optionBox 1 -annotation (getRunTimeCommandAnnotation("UVCameraBasedProjectionOptions")) -image "polyCameraUVs.png" -enableCommandRepeat false -command "UVCameraBasedProjectionOptions" cameraProjectionOptionItem ; // Contour stretch mapping menuItem -version "2016" -enableCommandRepeat true -dragMenuCommand ("performPolyProjectionArgList \"1\" {\"2\", \"Contour\", \"ls -selection\", \"0\"} \"\";") -rtc "UVContourStretchProjection" -ddc "UVContourStretchProjectionOptions" contourMappingItem ; menuItem -optionBox 1 -image "polyContourProjLarge.png" -annotation (getRunTimeCommandAnnotation("UVContourStretchProjectionOptions")) -enableCommandRepeat false -command "UVContourStretchProjectionOptions" contourMappingOptionItem ; menuItem -version 2018 -rtc "UVNormalBasedProjection" -ddc "UVNormalBasedProjectionOptions" ; menuItem -optionBox true -image "polyNormalProjLarge.png" -version 2018 -ecr false -annotation (getRunTimeCommandAnnotation("UVNormalBasedProjectionOptions")) -command "UVNormalBasedProjectionOptions" ; menuItem -divider true -ld false; // Cylindrical mapping menuItem -enableCommandRepeat true -dragMenuCommand ("performPolyProjectionArgList \"1\" {\"2\", \"Cylindrical\", \"ls -selection\", \"0\"} \"\";") -rtc "UVCylindricProjection" -ddc "UVCylindricProjectionOptions" cylindricMappingItem ; menuItem -optionBox 1 -image "polyCylProjLarge.png" -annotation (getRunTimeCommandAnnotation("UVCylindricProjectionOptions")) -enableCommandRepeat false -command "UVCylindricProjectionOptions" cylindricMappingOptionItem ; // Planar mapping menuItem -enableCommandRepeat true -dragMenuCommand ("performPolyProjectionArgList \"1\" {\"2\", \"Planar\", \"ls -selection\", \"0\"} \"\";") -rtc "UVPlanarProjection" -ddc "UVPlanarProjectionOptions" planarMappingItem ; menuItem -optionBox 1 -image "polyPlanProjLarge.png" -annotation (getRunTimeCommandAnnotation("UVPlanarProjectionOptions")) -enableCommandRepeat false -command "UVPlanarProjectionOptions" planarMappingOptionItem ; menuItem -enableCommandRepeat true -dragMenuCommand ("performPolyProjectionArgList \"1\" {\"2\", \"Spherical\", \"ls -selection\", \"0\"} \"\";") -rtc "UVSphericalProjection" -ddc "UVSphericalProjectionOptions" sphericMappingItem ; menuItem -optionBox 1 -image "polySphereProjLarge.png" -annotation (getRunTimeCommandAnnotation("UVSphericalProjectionOptions")) -enableCommandRepeat false -command "UVSphericalProjectionOptions" sphericMappingOptionItem ; // // Cut/Sew Section menuItem -divider true -dividerLabel (uiRes("m_ModelingUVMenu.kCutSewDivider")); menuItem -version "2018" -ecr true -rtc "AutoSeamUVs" -ddc "performPolyAutoSeamUV 1" ; menuItem -optionBox true -ecr false -rtc "AutoSeamUVsOptions" ; menuItem -divider true -ld false; menuItem -ecr true -dmc "polygonsMenuItemToShelf \"polyPerformAction polyMapCut e 0\"" -rtc "CutUVsWithoutHotkey" cutPolyUVsTextureItem; menuItem -ecr true -dmc "polygonsMenuItemToShelf \"polyPerformAction polyMapSew e 0\"" -rtc "SewUVsWithoutHotkey" sewPolyUVsTextureItem; menuItem -ecr true -rtc "SplitUV" splitPolyUVsTextureItem; menuItem -divider true -ld false; menuItem -ecr true -dmc "polygonsMenuItemToShelf \"polyPerformAction polyMapDel f 0\"" -rtc "DeleteUVsWithoutHotkey" delPolyUVsTextureItem; menuItem -rtc "MergeUV" -ddc "MergeUVOptions" ; menuItem -optionBox 1 -annotation ( getRunTimeCommandAnnotation ( "MergeUVOptions" ) ) -c "performPolyMergeUV 1" -ecr false -i "polyMergeUV.png" ; // // Tools Section menuItem -divider true -dividerLabel (uiRes("m_ModelingUVMenu.kToolsDivider")); menuItem -version 2018 -rtc "SetCutSewUVTool" -ddc "SetCutSewUVTool;toolPropertyWindow;"; menuItem -optionBox 1 -annotation `getRunTimeCommandAnnotation("SetCutSewUVTool")` -c "SetCutSewUVTool;toolPropertyWindow;" -ecr false -i "CutSewUVTool.png" ; menuItem -version 2016 -rtc "SetMeshGrabUVTool" -ddc "ShowMeshGrabUVToolOptions" ; menuItem -optionBox 1 -annotation `getRunTimeCommandAnnotation("ShowMeshGrabUVToolOptions")` -c "ShowMeshGrabUVToolOptions" -ecr false -i "UV_3D_Grab_Brush.png" ; setParent -menu ..; }