// =========================================================================== // 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 AEHIKPropStateRemapNew( string $niceName, string $item ) { string $attr = plugAttr( $item ); string $plug = hikGetSrcOnEffector( $item ); attrFieldSliderGrp -label $niceName -at $plug ($attr+"SliderGrp"); } global proc AEHIKPropStateRemapReplace( string $item ) { string $attr = plugAttr( $item ); string $plug = hikGetSrcOnEffector( $item ); attrFieldSliderGrp -e -at $plug ($attr+"SliderGrp"); } proc int determineRollExtractionState(string $plug, string $attr) // // Return whether or not the associated roll extraction widget should be // disabled. // { int $enable = 1; string $rollNode; // The roll properties are all the same name as the extraction properties // but without the Ex at the end. // For example: LeftArmRoll and LeftArmRollEx. // $rollNode = substring($attr,1,size($attr)-2); string $propNode = plugNode($plug); string $hikChar[] = `listConnections -type HIKCharacterNode $propNode`; if (size($hikChar) > 0) { string $rollSk = hikGetSkNode($hikChar[0],hikGetNodeIdFromName( $rollNode )); if ($rollSk == "") { $enable = 0; } } return $enable; } global proc AEHIKrollExtractionNew( string $niceName, string $item ) { string $attr = plugAttr( $item ); int $enableState = determineRollExtractionState($item,$attr); attrFieldSliderGrp -label $niceName -at $item -enable $enableState ($attr+"SliderGrp"); } global proc AEHIKrollExtractionReplace( string $item ) { string $attr = plugAttr( $item ); int $enableState = determineRollExtractionState($item,$attr); attrFieldSliderGrp -e -at $item ($attr+"SliderGrp"); attrFieldSliderGrp -e -enable $enableState ($attr+"SliderGrp"); } global proc AEHIKProperty2StateTemplate (string $nodeName ) { editorTemplate -beginScrollLayout; string $labelSolving = (uiRes("m_AEHIKProperty2StateTemplate.kSolvingLabel")); string $labelOffset = (uiRes("m_AEHIKProperty2StateTemplate.kOffsetLabel")); string $labelFloorContact = (uiRes("m_AEHIKProperty2StateTemplate.kFloorContactLabel")); string $labelFeet = (uiRes("m_AEHIKProperty2StateTemplate.kFeetLabel")); string $labelHands = (uiRes("m_AEHIKProperty2StateTemplate.kHandsLabel")); string $labelFingerToes = (uiRes("m_AEHIKProperty2StateTemplate.kFingerToeTipLabel")); string $labelRollPitch = (uiRes("m_AEHIKProperty2StateTemplate.kRollPitchLabel")); string $labelPullResist = (uiRes("m_AEHIKProperty2StateTemplate.kPullResistLabel")); string $labelRetarget = (uiRes("m_AEHIKProperty2StateTemplate.kRetargetLabel")); string $labelReach = (uiRes("m_AEHIKProperty2StateTemplate.kReachLabel")); string $labelPull = (uiRes("m_AEHIKProperty2StateTemplate.kPullLabel")); string $labelLeftLeg = (uiRes("m_AEHIKProperty2StateTemplate.kLeftLegLabel")); string $labelRightLeg = (uiRes("m_AEHIKProperty2StateTemplate.kRightLegLabel")); string $labelLeftArm = (uiRes("m_AEHIKProperty2StateTemplate.kLeftArmLabel")); string $labelRightArm = (uiRes("m_AEHIKProperty2StateTemplate.kRightArmLabel")); string $labelStiffness = (uiRes("m_AEHIKProperty2StateTemplate.kStiffnessLabel")); editorTemplate -beginLayout $labelRetarget -collapse 1; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kMatchShourceLabel")) -addControl "ForceActorSpace"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kActionSpaceCompModeLabel")) -addControl "ScaleCompensationMode"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kActionSpaceCompLabel")) -addControl "ScaleCompensation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kMirrorAnimLabel")) -addControl "Mirror"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHipsHeightCompensationModeLabel")) -addControl "HipsHeightCompensationMode"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHipsHeightCompensationLabel")) -addControl "HipsHeightCompensation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFeetSpacingModeLabel")) -addControl "AnkleProximityCompensationMode"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFeetSpacingLabel")) -addControl "AnkleProximityCompensation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kAnkleHeightCompensationModeLabel")) -addControl "AnkleHeightCompensationMode"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kAnkleHeightCompensationLabel")) -addControl "AnkleHeightCompensation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kMassCenterCompensationModeLabel")) -addControl "MassCenterCompensationMode"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kMassCenterCompensationLabel")) -addControl "MassCenterCompensation"; editorTemplate -beginLayout $labelReach -collapse 1; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftAnkleLabel")) -addControl "ReachActorLeftAnkle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightAnkle")) -addControl "ReachActorRightAnkle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachChest")) -addControl "ReachActorChest"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftWrist")) -addControl "ReachActorLeftWrist"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightWrist")) -addControl "ReachActorRightWrist"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftKnee")) -addControl "ReachActorLeftKnee"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightKnee")) -addControl "ReachActorRightKnee"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachHead")) -addControl "ReachActorHead"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftElbow")) -addControl "ReachActorLeftElbow"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightElbow")) -addControl "ReachActorRightElbow"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftShoulder")) -addControl "ReachActorLeftShoulder"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightShoulder")) -addControl "ReachActorRightShoulder"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftAnkleRotation")) -addControl "ReachActorLeftAnkleRotationRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightAnkleRotation")) -addControl "ReachActorRightAnkleRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachHeadRotation")) -addControl "ReachActorHeadRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftWristRotation")) -addControl "ReachActorLeftWristRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightWristRotation")) -addControl "ReachActorRightWristRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftFingerBase")) -addControl "ReachActorLeftFingerBase"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightFingerBase")) -addControl "ReachActorRightFingerBase"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftToesBase")) -addControl "ReachActorLeftToesBase"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightToesBase")) -addControl "ReachActorRightToesBase"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftFingerBaseRotation")) -addControl "ReachActorLeftFingerBaseRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightFingerBaseRotation")) -addControl "ReachActorRightFingerBaseRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftToeBaseRotation")) -addControl "ReachActorLeftToesBaseRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightToeBaseRotation")) -addControl "ReachActorRightToesBaseRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachChestRotation")) -addControl "ReachActorChestRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLowerChestRotation")) -addControl "ReachActorLowerChestRotation"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftHandThumb")) -addControl "ReachActorLeftHandThumb"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftHandIndex")) -addControl "ReachActorLeftHandIndex"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftHandMiddle")) -addControl "ReachActorLeftHandMiddle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftHandRing")) -addControl "ReachActorLeftHandRing"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftHandPinky")) -addControl "ReachActorLeftHandPinky"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftHandExtraFinger")) -addControl "ReachActorLeftHandExtraFinger"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightHandThumb")) -addControl "ReachActorRightHandThumb"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightHandIndex")) -addControl "ReachActorRightHandIndex"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightHandMiddle")) -addControl "ReachActorRightHandMiddle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightHandRing")) -addControl "ReachActorRightHandRing"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightHandPinky")) -addControl "ReachActorRightHandPinky"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightHandExtraFinger")) -addControl "ReachActorRightHandExtraFinger"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftFootThumb")) -addControl "ReachActorLeftFootThumb"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftFootIndex")) -addControl "ReachActorLeftFootIndex"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftFootMiddle")) -addControl "ReachActorLeftFootMiddle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftFootRing")) -addControl "ReachActorLeftFootRing"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftFootPinky")) -addControl "ReachActorLeftFootPinky"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachLeftFootExtraFinger")) -addControl "ReachActorLeftFootExtraFinger"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightFootThumb")) -addControl "ReachActorRightFootThumb"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightFootIndex")) -addControl "ReachActorRightFootIndex"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightFootMiddle")) -addControl "ReachActorRightFootMiddle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightFootRing")) -addControl "ReachActorRightFootRing"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightFootPinky")) -addControl "ReachActorRightFootPinky"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kReachRightFootExtraFinger")) -addControl "ReachActorRightFootExtraFinger"; editorTemplate -endLayout; editorTemplate -beginLayout $labelPull -collapse 1; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+(uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullHead"))+"\"") AEHIKPropStateRemapReplace "CtrlPullHead"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistChestPosition")) +"\"") AEHIKPropStateRemapReplace "CtrlResistChestPosition"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistHipsPosition")) +"\"") AEHIKPropStateRemapReplace "CtrlResistHipsPosition"; editorTemplate -beginLayout $labelLeftArm -collapse 1; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullLeftElbow")) +"\"") AEHIKPropStateRemapReplace "CtrlPullLeftElbow"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlChestPullLeftHand")) +"\"") AEHIKPropStateRemapReplace "CtrlChestPullLeftHand"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullLeftFingerBase")) +"\"") AEHIKPropStateRemapReplace "CtrlPullLeftFingerBase"; editorTemplate -endLayout; editorTemplate -beginLayout $labelRightArm -collapse 1; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullRightElbow")) +"\"") AEHIKPropStateRemapReplace "CtrlPullRightElbow"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlChestPullRightHand")) +"\"") AEHIKPropStateRemapReplace "CtrlChestPullRightHand"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullRightFingerBase")) +"\"") AEHIKPropStateRemapReplace "CtrlPullRightFingerBase"; editorTemplate -endLayout; editorTemplate -beginLayout $labelLeftLeg -collapse 1; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullLeftKnee")) +"\"") AEHIKPropStateRemapReplace "CtrlPullLeftKnee"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullLeftFoot")) +"\"") AEHIKPropStateRemapReplace "CtrlPullLeftFoot"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullLeftToeBase")) +"\"") AEHIKPropStateRemapReplace "CtrlPullLeftToeBase"; editorTemplate -endLayout; editorTemplate -beginLayout $labelRightLeg -collapse 1; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullRightKnee")) +"\"") AEHIKPropStateRemapReplace "CtrlPullRightKnee"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullRightFoot")) +"\"") AEHIKPropStateRemapReplace "CtrlPullRightFoot"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullRightToeBase")) +"\"") AEHIKPropStateRemapReplace "CtrlPullRightToeBase"; editorTemplate -endLayout; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kPullIterationCount")) -addControl "PullIterationCount"; editorTemplate -endLayout; editorTemplate -beginLayout $labelStiffness -collapse 1; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kParamCtrlNeckStiffness")) +"\"") AEHIKPropStateRemapReplace "ParamCtrlNeckStiffness"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistLeftCollar")) +"\"") AEHIKPropStateRemapReplace "CtrlResistLeftCollar"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistLeftElbow")) +"\"") AEHIKPropStateRemapReplace "CtrlResistLeftElbow"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistRightCollar")) +"\"") AEHIKPropStateRemapReplace "CtrlResistRightCollar"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistRightElbow")) +"\"") AEHIKPropStateRemapReplace "CtrlResistRightElbow"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistChestOrientation")) +"\"") AEHIKPropStateRemapReplace "CtrlResistChestOrientation"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kParamCtrlSpineStiffness")) +"\"") AEHIKPropStateRemapReplace "ParamCtrlSpineStiffness"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistHipsOrientation")) +"\"") AEHIKPropStateRemapReplace "CtrlResistHipsOrientation"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistLeftKnee")) +"\"") AEHIKPropStateRemapReplace "CtrlResistLeftKnee"; editorTemplate -callCustom ("AEHIKPropStateRemapNew \""+ (uiRes("m_AEHIKProperty2StateTemplate.kCtrlResistRightKnee")) +"\"") AEHIKPropStateRemapReplace "CtrlResistRightKnee"; editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout $labelSolving -collapse 1; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRigAlignLabel")) -addControl "rigAlign"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kShoulderCorrectionLabel")) -addControl "ShoulderCorrection"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kTopSpineCorrectionLabel")) -addControl "TopSpineCorrection"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLowerSpineCorrectionLabel")) -addControl "LowerSpineCorrection"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kExtraCollarRatioLabel")) -addControl "ExtraCollarRatio"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kCollarStiffnessXLabel")) -addControl "CollarStiffnessX"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kCollarStiffnessYLabel")) -addControl "CollarStiffnessY"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kCollarStiffnessZLabel")) -addControl "CollarStiffnessZ"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHipsTranslationModeLabel")) -addControl "HipsTranslationMode"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftArmMaxExtensionAngle")) -addControl "LeftArmMaxExtensionAngle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightArmMaxExtensionAngle")) -addControl "RightArmMaxExtensionAngle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftLegMaxExtensionAngle")) -addControl "LeftLegMaxExtensionAngle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightLegMaxExtensionAngle")) -addControl "RightLegMaxExtensionAngle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRealisticRightKneeSolvingLabel")) -addControl "RealisticRightKneeSolving"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRealisticLeftKneeSolvingLabel")) -addControl "RealisticLeftKneeSolving"; editorTemplate -beginLayout $labelOffset -collapse 1; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHipsTOffsetX")) -addControl "HipsTOffsetX"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHipsTOffsetY")) -addControl "HipsTOffsetY"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHipsTOffsetZ")) -addControl "HipsTOffsetZ"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kChestTOffsetX")) -addControl "ChestTOffsetX"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kChestTOffsetY")) -addControl "ChestTOffsetY"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kChestTOffsetZ")) -addControl "ChestTOffsetZ"; editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout $labelFloorContact -collapse 1; editorTemplate -beginLayout $labelFeet -collapse 1; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootFloorContact")) -addControl "FloorContact"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootBottomToAnkle")) -addControl "FootBottomToAnkle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootBackToAnkle")) -addControl "FootBackToAnkle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootMiddleToAnkle")) -addControl "FootMiddleToAnkle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootFrontToMiddle")) -addControl "FootFrontToMiddle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootInToAnkle")) -addControl "FootInToAnkle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootOutToAnkle")) -addControl "FootOutToAnkle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootContactType")) -addControl "FootContactType"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootFingerContact")) -addControl "FootFingerContact"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootFingerContactMode")) -addControl "FootFingerContactMode"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootFloorPivot")) -addControl "FloorPivot"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootContactStiffness")) -addControl "ParamFootContactStiffness"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFootFingerContactRollStiffness")) -addControl "ParamFootFingerContactRollStiffness"; editorTemplate -endLayout; editorTemplate -beginLayout $labelHands -collapse 1; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandFloorContact")) -addControl "HandFloorContact"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandBottomToWrist")) -addControl "HandBottomToWrist"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandBackToWrist")) -addControl "HandBackToWrist"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandMiddleToWrist")) -addControl "HandMiddleToWrist"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandFrontToMiddle")) -addControl "HandFrontToMiddle"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandInToWrist")) -addControl "HandInToWrist"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandOutToWrist")) -addControl "HandOutToWrist"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandContactType")) -addControl "HandContactType"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandFingerContact")) -addControl "HandFingerContact"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandFingerContactMode")) -addControl "HandFingerContactMode"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandFloorPivot")) -addControl "HandFloorPivot"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kHandContactStiffness")) -addControl "ParamHandContactStiffness"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kFingerContactStiffness")) -addControl "ParamHandFingerContactRollStiffness"; editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout $labelFingerToes -collapse 1; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftHandThumbTip")) -addControl "LeftHandThumbTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftHandIndexTip")) -addControl "LeftHandIndexTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftHandMiddleTip")) -addControl "LeftHandMiddleTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftHandRingTip")) -addControl "LeftHandRingTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftHandPinkyTip")) -addControl "LeftHandPinkyTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftHandExtraFingerTip")) -addControl "LeftHandExtraFingerTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightHandThumbTip")) -addControl "RightHandThumbTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightHandIndexTip")) -addControl "RightHandIndexTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightHandMiddleTip")) -addControl "RightHandMiddleTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightHandRingTip")) -addControl "RightHandRingTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightHandPinkyTip")) -addControl "RightHandPinkyTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightHandExtraFingerTip")) -addControl "RightHandExtraFingerTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftFootThumbTip")) -addControl "LeftFootThumbTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftFootIndexTip")) -addControl "LeftFootIndexTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftFootMiddleTip")) -addControl "LeftFootMiddleTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftFootRingTip")) -addControl "LeftFootRingTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftFootPinkyTip")) -addControl "LeftFootPinkyTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftFootExtraFingerTip")) -addControl "LeftFootExtraFingerTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightFootThumbTip")) -addControl "RightFootThumbTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightFootIndexTip")) -addControl "RightFootIndexTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightFootMiddleTip")) -addControl "RightFootMiddleTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightFootRingTip")) -addControl "RightFootRingTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightFootPinkyTip")) -addControl "RightFootPinkyTip"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightFootExtraFingerTip")) -addControl "RightFootExtraFingerTip"; editorTemplate -endLayout; editorTemplate -beginLayout $labelRollPitch -collapse 1; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRollMode")) -addControl "RollExtractionMode"; // Word-parts are used to build up attribute names, and // label-parts are used to build up localized labels. // // Limb word-parts and labels // string $limbs[] = {"Leg", "Arm"}; string $limbLabels[] = {(uiRes("m_AEHIKProperty2StateTemplate.kLeg")), (uiRes("m_AEHIKProperty2StateTemplate.kArm"))}; // One attribute needs to be added at the top of each full limb // section. // string $preLabels[] = {(uiRes("m_AEHIKProperty2StateTemplate.kLeftLegExtractFullRoll")) ,(uiRes("m_AEHIKProperty2StateTemplate.kRightLegExtractFullRoll")) ,(uiRes("m_AEHIKProperty2StateTemplate.kLeftArmExtractFullRoll")) ,(uiRes("m_AEHIKProperty2StateTemplate.kRightArmExtractFullRoll")) }; string $preAttrs[] = {"LeftLegFullRollExtraction" ,"RightLegFullRollExtraction" ,"LeftArmFullRollExtraction" ,"RightArmFullRollExtraction" }; // One or two attrs need to be added to the end of each // section. Define an array here, in order in which we process // the limbs. An empty-string attr means there is only one for // the current limb, so that there are exactly two entries per // limb. // string $postLabels[] = {(uiRes("m_AEHIKProperty2StateTemplate.kLeftHipRoll")) ,"" ,(uiRes("m_AEHIKProperty2StateTemplate.kLeftKneeRoll")) ,(uiRes("m_AEHIKProperty2StateTemplate.kLeftKneeKillPitch")) ,(uiRes("m_AEHIKProperty2StateTemplate.kRightHipRoll")) ,"" ,(uiRes("m_AEHIKProperty2StateTemplate.kRightKneeRoll")) ,(uiRes("m_AEHIKProperty2StateTemplate.kRightKneeKillPitch")) ,(uiRes("m_AEHIKProperty2StateTemplate.kLeftShoulderRoll")) ,"" ,(uiRes("m_AEHIKProperty2StateTemplate.kLeftElbowRoll")) ,(uiRes("m_AEHIKProperty2StateTemplate.kLeftElbowKillPitch")) ,(uiRes("m_AEHIKProperty2StateTemplate.kRightShoulderRoll")) ,"" ,(uiRes("m_AEHIKProperty2StateTemplate.kRightElbowRoll")) ,(uiRes("m_AEHIKProperty2StateTemplate.kRightElbowKillPitch")) }; string $postAttrs[] = {"leftHipRoll" ,"" ,"leftKneeRoll" ,"LeftKneeKillPitch" ,"rightHipRoll" ,"" ,"rightKneeRoll" ,"RightKneeKillPitch" ,"leftShoulderRoll" ,"" ,"leftElbowRoll" ,"LeftElbowKillPitch" ,"rightShoulderRoll" ,"" ,"rightElbowRoll" ,"RightElbowKillPitch" }; // Side word-parts and labels // string $sides[] = {"Left", "Right"}; string $sideLabels[] = {(uiRes("m_AEHIKProperty2StateTemplate.kLeft")), (uiRes("m_AEHIKProperty2StateTemplate.kRight")) }; // Sub-part word-parts and labels; only need labels for the // non-blank parts // string $armParts[] = {"", "Fore"}; string $legParts[] = {"Up", ""}; string $partLabels[] = {(uiRes("m_AEHIKProperty2StateTemplate.kUp")), (uiRes("m_AEHIKProperty2StateTemplate.kFore")) }; string $itemFmt = (uiRes("m_AEHIKProperty2StateTemplate.kRollBoneItemFmt")); string $layoutFmt = (uiRes("m_AEHIKProperty2StateTemplate.kRollBoneLayoutFmt")); string $parts[] = $legParts; int $limbIndex = 0; int $postIndex = 0; int $preIndex = 0; while( $limbIndex < size($limbs) ){ string $partLabel = $partLabels[$limbIndex]; string $limb = $limbs[$limbIndex]; string $limbLabel = $limbLabels[$limbIndex]; int $sideIndex = 0; while( $sideIndex < size($sides) ){ string $side = $sides[$sideIndex]; string $sideLabel = $sideLabels[$sideIndex]; string $layoutLabel = `format -s $sideLabel -s $limbLabel $layoutFmt`; editorTemplate -beginLayout $layoutLabel -collapse 1; // Add the pre controls (i.e., full roll extraction) // string $preAttr = $preAttrs[$preIndex]; string $preLabel = $preLabels[$preIndex]; editorTemplate -label $preLabel -addControl $preAttr; $preIndex++; int $partIndex = 0; while( $partIndex < size($parts) ){ string $part = $parts[$partIndex]; int $i = 0; while( $i < 5 ){ $i++; string $itemLabel = `format -s $sideLabel -s ($part==""?$part:$partLabel) -s $limbLabel -s $i $itemFmt`; string $attr = "ParamLeaf"+$side+$part+$limb+"Roll"+$i; editorTemplate -label $itemLabel -addControl $attr; } // Add the post controls (i.e., hip, knee, shoulder // and elbow must come last in the appropriate // section). // string $postAttr = $postAttrs[$postIndex]; string $postLabel = $postLabels[$postIndex]; editorTemplate -label $postLabel -addControl $postAttr; $postIndex++; $postAttr = $postAttrs[$postIndex]; if( $postAttr != "" ){ $postLabel = $postLabels[$postIndex]; editorTemplate -label $postLabel -addControl $postAttr; } $postIndex++; $partIndex++; } $sideIndex++; editorTemplate -endLayout; } clear $parts; $parts = $armParts; $limbIndex++; } editorTemplate -suppress "LeftUpLegRollMode"; editorTemplate -suppress "LeftUpLegRoll"; editorTemplate -suppress "LeftLegRollMode"; editorTemplate -suppress "LeftLegRoll"; editorTemplate -suppress "RightUpLegRollMode"; editorTemplate -suppress "RightUpLegRoll"; editorTemplate -suppress "RightLegRollMode"; editorTemplate -suppress "RightLegRoll"; editorTemplate -suppress "LeftArmRollMode"; editorTemplate -suppress "LeftArmRoll"; editorTemplate -suppress "LeftForeArmRollMode"; editorTemplate -suppress "LeftForeArmRoll"; editorTemplate -suppress "RightArmRollMode"; editorTemplate -suppress "RightArmRoll"; editorTemplate -suppress "RightForeArmRollMode"; editorTemplate -suppress "RightForeArmRoll"; //"LeftLegFullRollExtraction" //"RightLegFullRollExtraction" //"LeftArmFullRollExtraction" //"RightArmFullRollExtraction" editorTemplate -suppress "LeftForeArmRollEx"; editorTemplate -suppress "LeftArmRollEx"; editorTemplate -suppress "RightForeArmRollEx"; editorTemplate -suppress "RightArmRollEx"; editorTemplate -suppress "LeftLegRollEx"; editorTemplate -suppress "LeftUpLegRollEx"; editorTemplate -suppress "RightLegRollEx"; editorTemplate -suppress "RightUpLegRollEx"; editorTemplate -endLayout; editorTemplate -beginLayout $labelPullResist -collapse 1; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kCtrlEnforceGravity")) -addControl "CtrlEnforceGravity"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullLeftHand")) -addControl "CtrlPullLeftHand"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kCtrlPullRightHand")) -addControl "CtrlPullRightHand"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kMaxExtensionLeftKnee")) -addControl "CtrlResistMaximumExtensionLeftKnee"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kMaxExtensionRightKnee")) -addControl "CtrlResistMaximumExtensionRightKnee"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kMaxExtensionLeftElbow")) -addControl "CtrlResistMaximumExtensionLeftElbow"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kMaxExtensionRightElbow")) -addControl "CtrlResistMaximumExtensionRightElbow"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftKneeCompressionFactor")) -addControl "CtrlResistCompressionFactorLeftKnee"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightKneeCompressionFactor")) -addControl "CtrlResistCompressionFactorRightKnee"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kLeftElbowCompressionFactor")) -addControl "CtrlResistCompressionFactorLeftElbow"; editorTemplate -label (uiRes("m_AEHIKProperty2StateTemplate.kRightElbowCompressionFactor")) -addControl "CtrlResistCompressionFactorRightElbow"; editorTemplate -endLayout; editorTemplate -suppress "OutputPropertySetState"; editorTemplate -suppress "Posture"; editorTemplate -suppress "AutomaticToes"; editorTemplate -suppress "AutomaticFingers"; editorTemplate -suppress "FingerSolving"; editorTemplate -suppress "SnSScaleArmsAndLegs"; editorTemplate -suppress "SnSReachLeftWrist"; editorTemplate -suppress "SnSReachRightWrist"; editorTemplate -suppress "SnSReachLeftAnkle"; editorTemplate -suppress "SnSReachRightAnkle"; editorTemplate -suppress "SnSScaleSpine"; editorTemplate -suppress "SnSScaleSpineChildren"; editorTemplate -suppress "SnSSpineFreedom"; editorTemplate -suppress "SnSReachChestEnd"; editorTemplate -suppress "SnSScaleNeck"; editorTemplate -suppress "SnSNeckFreedom"; editorTemplate -suppress "SnSReachHead"; editorTemplate -suppress "SnSSmoothReach"; editorTemplate -suppress "FingerPropagation"; editorTemplate -suppress "LockX"; editorTemplate -suppress "LockY"; editorTemplate -suppress "LockZ"; editorTemplate -suppress "ParamRealisticArmSolving"; editorTemplate -suppress "ParamLeafLeftUpLegRoll1Mode"; editorTemplate -suppress "ParamLeafLeftLegRoll1Mode"; editorTemplate -suppress "ParamLeafRightUpLegRoll1Mode"; editorTemplate -suppress "ParamLeafRightLegRoll1Mode"; editorTemplate -suppress "ParamLeafLeftArmRoll1Mode"; editorTemplate -suppress "ParamLeafLeftForeArmRoll1Mode"; editorTemplate -suppress "ParamLeafRightArmRoll1Mode"; editorTemplate -suppress "ParamLeafRightForeArmRoll1Mode"; editorTemplate -suppress "ParamLeafLeftUpLegRoll2Mode"; editorTemplate -suppress "ParamLeafLeftLegRoll2Mode"; editorTemplate -suppress "ParamLeafRightUpLegRoll2Mode"; editorTemplate -suppress "ParamLeafRightLegRoll2Mode"; editorTemplate -suppress "ParamLeafLeftArmRoll2Mode"; editorTemplate -suppress "ParamLeafLeftForeArmRoll2Mode"; editorTemplate -suppress "ParamLeafRightArmRoll2Mode"; editorTemplate -suppress "ParamLeafRightForeArmRoll2Mode"; editorTemplate -suppress "ParamLeafLeftUpLegRoll3Mode"; editorTemplate -suppress "ParamLeafLeftLegRoll3Mode"; editorTemplate -suppress "ParamLeafRightUpLegRoll3Mode"; editorTemplate -suppress "ParamLeafRightLegRoll3Mode"; editorTemplate -suppress "ParamLeafLeftArmRoll3Mode"; editorTemplate -suppress "ParamLeafLeftForeArmRoll3Mode"; editorTemplate -suppress "ParamLeafRightArmRoll3Mode"; editorTemplate -suppress "ParamLeafRightForeArmRoll3Mode"; editorTemplate -suppress "ParamLeafLeftUpLegRoll4Mode"; editorTemplate -suppress "ParamLeafLeftLegRoll4Mode"; editorTemplate -suppress "ParamLeafRightUpLegRoll4Mode"; editorTemplate -suppress "ParamLeafRightLegRoll4Mode"; editorTemplate -suppress "ParamLeafLeftArmRoll4Mode"; editorTemplate -suppress "ParamLeafLeftForeArmRoll4Mode"; editorTemplate -suppress "ParamLeafRightArmRoll4Mode"; editorTemplate -suppress "ParamLeafRightForeArmRoll4Mode"; editorTemplate -suppress "ParamLeafLeftUpLegRoll5Mode"; editorTemplate -suppress "ParamLeafLeftLegRoll5Mode"; editorTemplate -suppress "ParamLeafRightUpLegRoll5Mode"; editorTemplate -suppress "ParamLeafRightLegRoll5Mode"; editorTemplate -suppress "ParamLeafLeftArmRoll5Mode"; editorTemplate -suppress "ParamLeafLeftForeArmRoll5Mode"; editorTemplate -suppress "ParamLeafRightArmRoll5Mode"; editorTemplate -suppress "ParamLeafRightForeArmRoll5Mode"; editorTemplate -suppress "LeftLegFullRollExtractionMode"; editorTemplate -suppress "RightLegFullRollExtractionMode"; editorTemplate -suppress "LeftArmFullRollExtractionMode"; editorTemplate -suppress "RightArmFullRollExtractionMode"; // include/call base class/node attributes AEdependNodeTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }