// =========================================================================== // 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. // =========================================================================== // // Procedure Name: // AEpointConstraintTemplate // // Description Name; // Creates the attribute editor controls for the pointConstraint Node // // Input Value: // nodeName // // Output Value: // None // global proc AEconstraintOffsetPolarityNew( string $attrName ) { setUITemplate -pst attributeEditorTemplate; attrFieldSliderGrp -attribute $attrName -label (uiRes("m_AEpointConstraintTemplate.kOffsetPolarity")) constraintOffsetPolaritySlider; setUITemplate -ppt; } global proc AEconstraintOffsetPolarityReplace( string $attrName ) { string $label = uiRes( "m_AEpointConstraintTemplate.kOffsetPolarity" ); attrFieldSliderGrp -e -attribute $attrName -label $label constraintOffsetPolaritySlider; } global proc AEenableRestPointCallback( string $nodeName ) { int $enable = `getAttr ($nodeName+".enableRestPosition")`; editorTemplate -dimControl $nodeName "restTranslate" (! $enable); } global proc AEpointConstraintTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; // include/call base class/node attributes AEtransformMain $nodeName; editorTemplate -beginLayout (uiRes("m_AEpointConstraintTemplate.kPointConstraintAttributes")) -collapse 0; editorTemplate -addControl "lockOutput"; editorTemplate -addControl "offset"; editorTemplate -callCustom "AEconstraintOffsetPolarityNew" "AEconstraintOffsetPolarityReplace" "constraintOffsetPolarity"; editorTemplate -addSeparator; editorTemplate -addControl "constraintTranslate"; editorTemplate -addControl "enableRestPosition" "AEenableRestPointCallback"; editorTemplate -addControl "restTranslate"; // suppressed attributes editorTemplate -suppress "constraintRotatePivot"; editorTemplate -suppress "constraintParentInverseMatrix"; editorTemplate -suppress "constraintRotateTranslate"; editorTemplate -suppress "target"; editorTemplate -endLayout; // include/call base class/node attributes AEtransformNoScroll $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }