// =========================================================================== // 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: // This script sets the values for the specified latticeDeformKey // context within the tool property sheet. // // Input Arguments: // None. // // Return Value: // None. // global proc textureLatticeDeformRowChange( string $parent, string $context ) { setParent $parent; int $row = `intSliderGrp -query -value texLatticeDeformRows`; texLatticeDeformContext -edit -latticeRows $row $context; } global proc textureLatticeDeformColumnChange( string $parent, string $context ) { setParent $parent; int $col = `intSliderGrp -query -value texLatticeDeformColumns`; texLatticeDeformContext -edit -latticeColumns $col $context; } global proc textureLatticeDeformEnvelopeChange( string $parent, string $context ) { setParent $parent; float $env = `floatSliderGrp -query -value texLatticeDeformEnvelope`; texLatticeDeformContext -edit -envelope $env $context; } global proc textureLatticeDeformUseBoundChange( string $parent, string $context ) { setParent $parent; int $ub = `checkBoxGrp -query -value1 texLatticeDeformUseBoundRect`; texLatticeDeformContext -edit -ubr $ub $context; } global proc textureLatticeShowMoveManipulatorChange(string $parent, string $context) { setParent $parent; int $smm = `checkBoxGrp - query - value1 texLatticeDeformShowMoveManipulator`; texLatticeDeformContext -edit -smm $smm $context; } global proc textureLatticeDeformValues( string $context ) { string $parent = `toolPropertyWindow -query -location`; setParent $parent; int $rows = `texLatticeDeformContext -query -latticeRows $context`; int $col = `texLatticeDeformContext -query -latticeColumns $context`; float $env = `texLatticeDeformContext -query -envelope $context`; int $br = `texLatticeDeformContext -query -ubr $context`; int $smm = `texLatticeDeformContext -query -smm $context`; intSliderGrp -edit -changeCommand ("textureLatticeDeformRowChange " + $parent + " " + $context) -value $rows -min 2 -max 8 texLatticeDeformRows; intSliderGrp -edit -changeCommand ("textureLatticeDeformColumnChange " + $parent + " " + $context) -min 2 -max 8 -value $col texLatticeDeformColumns; floatSliderGrp -edit -changeCommand ("textureLatticeDeformEnvelopeChange " + $parent + " " + $context) -value $env texLatticeDeformEnvelope; checkBoxGrp -edit -changeCommand( "textureLatticeDeformUseBoundChange " + $parent + " " + $context) -v1 $br texLatticeDeformUseBoundRect; checkBoxGrp - edit - changeCommand("textureLatticeShowMoveManipulatorChange " + $parent + " " + $context) - v1 $smm texLatticeDeformShowMoveManipulator; int $snapMode = `texLatticeDeformContext -q -snapPixelMode $context`; // Recast the values to the selected items switch ($snapMode) { case 1: radioButtonGrp -e -sl 1 texLatSnapMode; break; case 0: radioButtonGrp -e -sl 2 texLatSnapMode; break; } // setup the commands radioButtonGrp -e -on1 ("texLatticeDeformContext -e -snapPixelMode 1 " + $context) -on2 ("texLatticeDeformContext -e -snapPixelMode 0 " + $context) texLatSnapMode; string $helpTag = "UVTextureEditorLatticeTool"; toolPropertySetCommon $context "uvlattice.png" $helpTag; toolPropertySelect "textureLatticeDeform"; }