// =========================================================================== // 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 texScaleValues ( string $toolName ) { string $parent = (`toolPropertyWindow -q -location` + "|texScale"); setParent $parent; texTranConstUpdate("texTranConstTextField"); menu -e -dai texScaleSnapPopupMenu; menuItem -label (uiRes("m_texScaleValues.kOff")) -p texScaleSnapPopupMenu -c ("texScaleContext -e -snap 0 " + $toolName); menuItem -label (uiRes("m_texScaleValues.kOn")) -p texScaleSnapPopupMenu -c ("texScaleContext -e -snap 1 " + $toolName); menu -e -pmc("texScaleContext -e -snap (!`texScaleContext -q -snap " + $toolName + "`) " + $toolName) texScaleSnapTogglePopupMenu; string $label = ""; int $snapMode = `texScaleContext -q -snap $toolName`; if($snapMode) $label = uiRes("m_texScaleValues.kOn"); else $label = uiRes("m_texScaleValues.kOff"); textField -e -tx $label texScaleSnapModeLabel; floatField -e -en ($snapMode != 0) -v (`texScaleContext -q -snapValue $toolName`) texScaleSnapValue; floatField -e -cc("texScaleContext -e -snapValue #1 " + $toolName) texScaleSnapValue; checkBoxGrp -e -value1 (`texScaleContext -q -preventNegativeScale $toolName`) -cc1 ("texScaleContext -e -preventNegativeScale #1 " + $toolName) texPreventNegativeScaleCheck; // Update soft select values reflectionValues( ); softSelectValues( $parent ); commonSelectValues( $parent ); string $icon = "texScale.xpm"; string $helpTag = "texScaleTool"; toolPropertySetCommon $toolName $icon $helpTag; toolPropertySelect "texScale"; }