// =========================================================================== // 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: April 12 1996 // // Description: // // Input Arguments: // None. // // Return Value: // None. // proc wireSetCallbacks (string $parent) { // // Description: // Set the callbacks for all of the controls in the dialog. // Modifying the context will force wireValues() to be called // to update the state of the property sheet. // // setParent $parent; checkBoxGrp -e -cc "wireContext -e -ho #1 `currentCtx`" holderBox; floatSliderGrp -e -cc "wireContext -e -en #1 `currentCtx`" envelopeSlider; floatSliderGrp -e -cc "wireContext -e -ce #1 `currentCtx`" conSlider; floatSliderGrp -e -cc "wireContext -e -li #1 `currentCtx`" locSlider; floatSliderGrp -e -cc "wireContext -e -dds #1 `currentCtx`" ddSlider; checkBoxGrp -e -cc "wireContext -e -gw #1 `currentCtx`" groupWireBox; optionMenuGrp -e -cc "wireContext -e -do #1 `currentCtx`" wirePositioningWidget; checkBoxGrp -e -cc "wireContext -e -exc #1 `currentCtx`;optionMenuGrp -e -enable #1 partitionListWidget;textFieldGrp -e -enable #1 partitionNameWidget" exclWidget; textFieldGrp -e -cc "wireContext -e -ep #1 `currentCtx`" partitionNameWidget; } global proc wireProperties ( ) { // // Description: // This procedure builds the property sheet and assigns callbacks to // its controls. The state of the controls are set in wireValues(). // // setUITemplate -pushTemplate OptionsTemplate; string $parent = `toolPropertyWindow -q -location`; setParent $parent; columnLayout wire; frameLayout -collapsable true -collapse false -label (uiRes("m_wireProperties.kWireSettings")) preserveEditFrame_tab; columnLayout ; checkBoxGrp -ncb 1 -annotation (uiRes("m_wireProperties.kHoldersAnnot")) -label1 (uiRes("m_wireProperties.kHolders")) holderBox; floatSliderGrp -field true -max 1.0 -annotation (uiRes("m_wireProperties.kEnvelopeAnnot")) -label (uiRes("m_wireProperties.kEnvelope")) envelopeSlider; floatSliderGrp -field true -max 1.0 -annotation (uiRes("m_wireProperties.kCrossingEffectAnnot")) -label (uiRes("m_wireProperties.kCrossingEffect")) conSlider; floatSliderGrp -field true -max 1.0 -annotation (uiRes("m_wireProperties.kLocalInfluenceAnnot")) -label (uiRes("m_wireProperties.kLocalInfluence")) locSlider; floatSliderGrp -field true -max 10.0 -annotation (uiRes("m_wireProperties.kDropoffDistanceAnnot")) -label (uiRes("m_wireProperties.kDropoffDistance")) ddSlider; checkBoxGrp -ncb 1 -annotation (uiRes("m_wireProperties.kGroupingOptionAnnot")) -label (uiRes("m_wireProperties.kGrouping")) -label1 (uiRes("m_wireProperties.kGroupWire")) groupWireBox; separator; // Positioning of the wire deformer in the DG optionMenuGrp -annotation (uiRes("m_wireProperties.kDeformationOrderAnnot")) -label (uiRes("m_wireProperties.kDeformationOrder")) wirePositioningWidget; menuItem -label (uiRes("m_wireProperties.kDefault")) wirePosItem1; menuItem -label (uiRes("m_wireProperties.kBefore")) wirePosItem2; menuItem -label (uiRes("m_wireProperties.kAfter")) wirePosItem3; menuItem -label (uiRes("m_wireProperties.kSplit")) wirePosItem4; menuItem -label (uiRes("m_wireProperties.kParallel")) wirePosItem5; separator; // exclusive deformation UI checkBoxGrp -numberOfCheckBoxes 1 -label "" -annotation (uiRes("m_wireProperties.kExclusiveOptionAnnot")) -label1 (uiRes("m_wireProperties.kExclusive")) -v1 0 // -on1 "optionMenuGrp -e -enable 1 partitionListWidget;textFieldGrp -e -enable 1 partitionNameWidget" // -offCommand "optionMenuGrp -e -enable 0 partitionListWidget;textFieldGrp -e -enable 0 partitionNameWidget" exclWidget; textFieldGrp -label (uiRes("m_wireProperties.kExclusivePartition")) -enable `checkBoxGrp -q -v1 exclWidget` -tx "deformPartition" partitionNameWidget; // Create an option menu listing the partitions // optionMenuGrp -label (uiRes("m_wireProperties.kExistingPartitions")) -enable `checkBoxGrp -q -v1 exclWidget` -cc "textFieldGrp -e -tx `optionMenuGrp -q -v partitionListWidget` partitionNameWidget" partitionListWidget; // add all the partitions to the menu // int $pp; string $partitionArray[]; $partitionArray = `ls -type partition`; int $partitionCount = size($partitionArray); for ($pp = 0;$pp < $partitionCount;$pp++) { // Do not list the render partition as adding items to // it is only going to cause confusion. // if ($partitionArray[$pp] != "renderPartition") { menuItem -label $partitionArray[$pp]; } } setParent ..; setParent ..; setParent ..; wireSetCallbacks ($parent); setUITemplate -popTemplate; }