// =========================================================================== // 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: 1998 // // Procedure Name: // AEstrokeTemplate // // Description Name; // Creates the attribute editor controls for the stroke Node // // Input Value: // nodeName // // Output Value: // None // global string $positionStrokeName = ""; global proc positionStrokeReplace( string $nodeName ) { global string $positionStrokeName; radioButtonGrp -e -onCommand1 ("setAttr "+$nodeName+" 1") -onCommand2 ("setAttr "+$nodeName+" 0") $positionStrokeName; if (`getAttr $nodeName`) { radioButtonGrp -e -select 1 $positionStrokeName; } else { radioButtonGrp -e -select 2 $positionStrokeName; } } global proc positionStrokeNew( string $nodeName ) { global string $positionStrokeName; if ($positionStrokeName == "" || !`radioButtonGrp -exists $positionStrokeName`) { string $inThreeD = (uiRes("m_AEstrokeTemplate.kInThreeD")); string $onViewPlane = (uiRes("m_AEstrokeTemplate.kOnViewPlane")); $positionStrokeName = `radioButtonGrp -numberOfRadioButtons 2 -label (uiRes("m_AEstrokeTemplate.kPositionStroke")) -labelArray2 $inThreeD $onViewPlane -columnWidth3 135 100 130 positionStrokeButons`; } positionStrokeReplace( $nodeName ); } global proc AEstrokeDimUseNormal( string $nodeName ) { int $n = getAttr($nodeName + ".useNormal" ); editorTemplate -dimControl $nodeName "normal" (!$n); editorTemplate -dimControl $nodeName "minimalTwist" ($n); } // // Procedure Name: // AEbrushTemplate // global proc AEstrokeTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; editorTemplate -suppress "useObjectColor"; editorTemplate -suppress "objectColor"; editorTemplate -suppress "objectColorRGB"; editorTemplate -suppress "drawOverride"; editorTemplate -suppress "brush"; editorTemplate -suppress "curveMode"; editorTemplate -suppress "leafCurveMode"; editorTemplate -suppress "flowerCurveMode"; editorTemplate -callCustom "positionStrokeNew" "positionStrokeReplace" "perspective"; editorTemplate -addControl -label (uiRes("m_AEstrokeTemplate.kDisplayQuality")) "displayPercent"; editorTemplate -addControl "drawAsMesh"; editorTemplate -addControl "sampleDensity"; editorTemplate -addControl "seed"; editorTemplate -addControl "drawOrder"; editorTemplate -addControl "surfaceOffset"; editorTemplate -addControl "smoothing"; editorTemplate -addControl "motionBlurred"; editorTemplate -interruptOptimize; editorTemplate -addControl "primaryVisibility"; // Stroke Render // editorTemplate -beginLayout (uiRes("m_AEstrokeTemplate.kEndBounds")) -collapse 1; editorTemplate -addControl "minClip"; editorTemplate -addControl "maxClip"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEstrokeTemplate.kNormalDirection")) -collapse 1; editorTemplate -addControl "useNormal" "AEstrokeDimUseNormal"; editorTemplate -addControl "minimalTwist"; editorTemplate -addControl "normal"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEstrokeTemplate.kPressureMappings")) -collapse 1; AEaddRampControl ($nodeName+".pressureScale"); editorTemplate -addControl "pressureMap1"; editorTemplate -addControl "pressureMin1"; editorTemplate -addControl "pressureMax1"; editorTemplate -addSeparator; editorTemplate -addControl "pressureMap2"; editorTemplate -addControl "pressureMin2"; editorTemplate -addControl "pressureMax2"; editorTemplate -addSeparator; editorTemplate -addControl "pressureMap3"; editorTemplate -addControl "pressureMin3"; editorTemplate -addControl "pressureMax3"; editorTemplate -addControl "pressure"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEstrokeTemplate.kInputCurves")) -collapse 1; editorTemplate -addControl "pathCurve"; editorTemplate -addControl "controlCurve"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEstrokeTemplate.kMeshOutput")) -collapse 1; editorTemplate -addControl -label (uiRes("m_AEstrokeTemplate.kColorPerVertex")) "meshVertexColorMode"; editorTemplate -addControl -label (uiRes("m_AEstrokeTemplate.kHardEdges")) "meshHardEdges"; editorTemplate -addControl -label (uiRes("m_AEstrokeTemplate.kOutputQuads")) "meshQuadOutput"; editorTemplate -addControl -label (uiRes("m_AEstrokeTemplate.kPolyLimit")) "meshPolyLimit"; editorTemplate -addControl "cameraPoint"; editorTemplate -beginLayout (uiRes("m_AEstrokeTemplate.kMeshVertexDetails")) -collapse 1; editorTemplate -addControl -label (uiRes("m_AEstrokeTemplate.kMainVertexBuffer")) "mainVertBufSize"; editorTemplate -addControl -label (uiRes("m_AEstrokeTemplate.kLeafVertexBuffer")) "leafVertBufSize"; editorTemplate -addControl -label (uiRes("m_AEstrokeTemplate.kFlowerVertexBuffer")) "flowerVertBufSize"; editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEstrokeTemplate.kNurbsOutput")) -collapse 1; editorTemplate -addControl "degree"; editorTemplate -addControl "curveAlign"; editorTemplate -endLayout; // include/call base class/node attributes AEshapeTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }