// =========================================================================== // 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. // =========================================================================== // Description: initializes Unfold3DBrush tool property sheet values // // Input Arguments: // toolName - this is the name of the instance of the tool // that the property sheet is modifying. // // Return Value: // None. // global proc Unfold3DBrushValues(string $toolName) { // string $parent = (`toolPropertyWindow -q -location` + "|Unfold3DBrush|Unfold3DTabs|Unfold3DTab"); string $parent = (`toolPropertyWindow -q -location` + "|Unfold3DBrush"); setParent $parent; frameLayout -e -en true -cl false unfold3DBrushFrame; Unfold3DBrushOptionValues($toolName); string $brushInfo[]; $setInt = eval("Unfold3DContext -q -u " + $toolName); if ($setInt) { $brushInfo[0] = (uiRes("m_Unfold3DBrushValues.kU3DBrushUUVTool")); $brushInfo[1] = "UV_Unfold_Brush.png"; $brushInfo[2] = "UnfoldBrush"; } else { $brushInfo[0] = (uiRes("m_Unfold3DBrushValues.kU3DBrushOUVTool")); $brushInfo[1] = "UV_Optimize_Brush.png"; $brushInfo[2] = "OptimizeBrush"; } toolPropertySetCommon $brushInfo[0] $brushInfo[1] $brushInfo[2]; toolPropertySelect Unfold3DBrush; string $nameField = `toolPropertyWindow -query -field`; text -edit -label $brushInfo[0] $nameField; string $reset = `toolPropertyWindow -query -resetButton`; button -edit -enable true -command ("Unfold3DBrushValues_ResetTool \"" + $toolName + "\"") $reset; } global proc Unfold3DBrushOptionValues(string $toolName) { int $setInt; float $setFloat; $setInt = eval("Unfold3DContext -q -u " + $toolName); if ($setInt) { radioButtonGrp -e -select 1 mode; floatSliderGrp -e -enable false surfangle; } else { radioButtonGrp -e -select 2 mode; floatSliderGrp -e -enable true surfangle; } $setFloat = eval("Unfold3DContext -q -sizeuv " + $toolName); floatSliderGrp -e -v $setFloat brushSize; $setFloat = eval("Unfold3DContext -q -pressure " + $toolName); floatSliderGrp -e -v $setFloat brushPressure; $setFloat = eval("Unfold3DContext -q -sa " + $toolName); floatSliderGrp -e -v $setFloat surfangle; }