// =========================================================================== // 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: // AEbrushTemplate // // Description: // Creates the attribute editor controls for the brush Node // // Input Value: // nodeName // // Output Value: // None // // // Procedure Name: // AEassignBrushTextureCB // global proc int AEassignBrushTextureCB( string $fileAttribute, string $fileName, string $fileType ) { setAttr $fileAttribute -type "string" $fileName; string $currentDir = `workspace -q -dir`; retainWorkingDirectory ($currentDir); return true; } // // Procedure Name: // AEbrushTextureBrowser // global proc AEbrushTextureBrowser( string $cmd ) { string $workspace = `workspace -q -fn`; setWorkingDirectory $workspace "image" "sourceImages"; string $open = (uiRes("m_AEbrushTemplate.kOpen")); fileBrowser ($cmd, $open, "image", 100); } // // Procedure Name: // AEbrushTextureNameNew // global proc AEbrushTextureNameNew (string $fileAttribute) { setUITemplate -pst attributeEditorTemplate; rowLayout -nc 3 textureNameLayout; text -label (uiRes("m_AEbrushTemplate.kImageName")); textField textureNameField; symbolButton -image "navButtonBrowse.png" browser; setParent ..; setUITemplate -ppt; AEbrushTextureNameReplace $fileAttribute; } // // Procedure Name: // AEbrushTextureNameReplace // global proc AEbrushTextureNameReplace (string $fileAttribute) { connectControl -fileName textureNameField $fileAttribute; string $command = "AEassignBrushTextureCB "+" "+$fileAttribute; button -e -c ("AEbrushTextureBrowser \"" + $command + "\"" ) browser; } global proc AEbrushCustomColor1New(string $label, int $idx, string $attrName1) { global string $gAEbrushControls[]; $gAEbrushControls[$idx] = ("customColorSlider" + $idx); attrColorSliderGrp -label $label -sb false -at $attrName1 $gAEbrushControls[$idx]; } global proc AEbrushCustomColor1Replace(string $label, int $idx, string $attrName1) { global string $gAEbrushControls[]; attrColorSliderGrp -edit -at $attrName1 -label $label $gAEbrushControls[$idx]; } global proc checkBrushUseFrameExtension ( string $nodeName ) { string $nodeAttr = $nodeName + ".useFrameExtension"; int $value = `getAttr $nodeAttr`; if ( $value == 1 ) { editorTemplate -dimControl $nodeName "frameExtension" false; } else { editorTemplate -dimControl $nodeName "frameExtension" true; } } // // Procedure Name: // AEbrushTemplate // global proc AEbrushTemplate ( string $nodeName ) { editorTemplate -beginNoOptimize; editorTemplate -beginScrollLayout; editorTemplate -addControl "brushType" "checkType"; editorTemplate -addControl "globalScale"; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorChannels")) -collapse 1; editorTemplate -addControl "depth" "checkDepth"; editorTemplate -addControl "modifyDepth"; editorTemplate -addControl "modifyColor"; editorTemplate -addControl "modifyAlpha"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorBrushProfile")) -collapse 1; editorTemplate -addControl "brushWidth"; editorTemplate -addControl "softness"; editorTemplate -addControl "flatness1"; editorTemplate -addControl "flatness2"; editorTemplate -addControl "stampDensity"; editorTemplate -addSeparator; editorTemplate -addControl "occlusionWidthScale"; editorTemplate -addControl "edgeClip" "checkEdgeClip"; editorTemplate -addControl "edgeClipDepth"; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kScreenWidth")) -collapse 1; editorTemplate -addControl "screenspaceWidth" "checkScreenspaceWidth"; editorTemplate -addControl "distanceScaling"; editorTemplate -addControl "minPixelWidth"; editorTemplate -addControl "maxPixelWidth"; editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorTwist")) -collapse 1; editorTemplate -addControl "forwardTwist"; editorTemplate -addControl "twist"; editorTemplate -addControl "twistRate"; editorTemplate -addControl "twistRand"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kThinLineMultistreaks")) -collapse 1; editorTemplate -addControl "multiStreaks"; editorTemplate -addControl "multiStreakSpread1"; editorTemplate -addControl "multiStreakSpread2"; editorTemplate -label (uiRes("m_AEbrushTemplate.kMultiStreakDiffuseRand")) -addControl "multiStreakDiffuseRand"; editorTemplate -label (uiRes("m_AEbrushTemplate.kMultiStreakSpecularRand")) -addControl "multiStreakSpecularRand"; editorTemplate -label (uiRes("m_AEbrushTemplate.kLightAllStreaks")) -addControl "multiStreakLightAll"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorMesh")) -collapse 1; editorTemplate -addControl "tubeSections"; editorTemplate -addControl "subSegments"; editorTemplate -addControl "singleSided"; editorTemplate -addControl "perPixelLighting"; editorTemplate -addControl "endCaps"; editorTemplate -addControl "hardEdges"; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kThornsOnMesh")) -collapse 1; editorTemplate -addControl "branchThorns" "checkThorns"; editorTemplate -addControl "twigThorns" "checkThorns"; editorTemplate -addControl "leafThorns" "checkThorns"; editorTemplate -addControl "flowerThorns"; editorTemplate -addControl "thornDensity"; editorTemplate -addControl "thornElevation"; editorTemplate -addControl "thornLength"; editorTemplate -addControl "thornBaseWidth"; editorTemplate -addControl "thornTipWidth"; editorTemplate -addControl "thornSpecular"; editorTemplate -addControl "thornBaseColor"; editorTemplate -addControl "thornTipColor"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEnvironmentReflections")) -collapse 1; editorTemplate -addControl "branchReflectivity"; editorTemplate -addControl "leafReflectivity"; editorTemplate -addControl "flowerReflectivity"; AEaddRampControl ($nodeName+".environment"); AEaddRampControl ($nodeName+".reflectionRolloff"); editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorShading")) -collapse 1; string $sliderName = attributeName( $nodeName + ".color1" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 1") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 1") "color1"; $sliderName = attributeName( $nodeName + ".incandescence1" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 2") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 2") "incandescence1"; $sliderName = attributeName( $nodeName + ".transparency1" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 3") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 3") "transparency1"; editorTemplate -addControl "blurIntensity" "checkType"; editorTemplate -addControl "edgeAntialias"; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kTubeShading")) -collapse 1; $sliderName = attributeName( $nodeName + ".color2" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 4") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 4") "color2"; $sliderName = attributeName( $nodeName + ".incandescence2" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 5") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 5") "incandescence2"; $sliderName = attributeName( $nodeName + ".transparency2" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 6") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 6") "transparency2"; editorTemplate -addControl "hueRand"; editorTemplate -addControl "satRand"; editorTemplate -addControl "valRand"; editorTemplate -addControl "brightnessRand"; editorTemplate -addControl "rootFade"; editorTemplate -addControl "tipFade"; editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorTexturing")) -collapse 1; editorTemplate -addControl "mapColor" "checkMapping"; editorTemplate -addControl "texColorScale"; editorTemplate -addControl "texColorOffset"; editorTemplate -addSeparator; editorTemplate -addControl "mapOpacity" "checkMapping"; editorTemplate -addControl "texOpacityScale"; editorTemplate -addControl "texOpacityOffset"; editorTemplate -addSeparator; editorTemplate -addControl "mapDisplacement" "checkMapping"; editorTemplate -addControl "displacementScale"; editorTemplate -addControl "displacementOffset"; editorTemplate -addControl "bumpIntensity"; editorTemplate -addControl "bumpBlur"; editorTemplate -addControl -label (uiRes("m_AEbrushTemplate.kUseLuminance")) "luminanceIsDisplacement"; editorTemplate -addSeparator; editorTemplate -addControl "textureType" "checkMapping"; editorTemplate -addControl "mapMethod"; editorTemplate -addControl "texUniformity"; $sliderName = attributeName( $nodeName + ".texColor1" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 7") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 7") "texColor1"; $sliderName = attributeName( $nodeName + ".texColor2" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 8") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 8") "texColor2"; editorTemplate -addControl "texAlpha1"; editorTemplate -addControl "texAlpha2"; editorTemplate -addControl "repeatU"; editorTemplate -addControl "repeatV"; editorTemplate -addControl "offsetU"; editorTemplate -addControl "offsetV"; editorTemplate -addControl "blurMult"; editorTemplate -addControl "smear"; editorTemplate -addControl "smearU"; editorTemplate -addControl "smearV"; editorTemplate -addSeparator; editorTemplate -callCustom "AEbrushTextureNameNew" "AEbrushTextureNameReplace" "imageName"; editorTemplate -addControl "useFrameExtension" "checkBrushUseFrameExtension"; editorTemplate -addControl "frameExtension"; editorTemplate -addControl "fringeRemoval"; editorTemplate -addSeparator; editorTemplate -addControl "fractalAmplitude"; editorTemplate -addControl "fractalRatio"; editorTemplate -addControl "fractalThreshold"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorIllumination")) -collapse 1; editorTemplate -addControl "illuminated" "checkIllumination"; editorTemplate -addControl "realLights" "checkIllumination"; editorTemplate -addControl "lightingBasedWidth" "checkIllumination"; editorTemplate -addControl "lightDirection"; editorTemplate -addSeparator; editorTemplate -addControl "translucence"; editorTemplate -addSeparator; editorTemplate -addControl "specular"; editorTemplate -addControl "specularPower"; $sliderName = attributeName( $nodeName + ".specularColor" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 9") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 9") "specularColor"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorShadowEffects")) -collapse 1; editorTemplate -addControl "fakeShadow" "checkFakeShadow"; editorTemplate -addControl "shadowDiffusion"; editorTemplate -addControl "shadowOffset"; editorTemplate -label (uiRes("m_AEbrushTemplate.kShadowTransp")) -addControl "shadowTransparency"; editorTemplate -addSeparator; editorTemplate -addControl "backShadow"; editorTemplate -addControl "centerShadow"; editorTemplate -addSeparator; editorTemplate -addControl "depthShadowType"; editorTemplate -addControl "depthShadow"; editorTemplate -addControl "depthShadowDepth"; editorTemplate -addSeparator; editorTemplate -addControl "castShadows"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorGlow")) -collapse 1; editorTemplate -addControl "glow"; $sliderName = attributeName( $nodeName + ".glowColor" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 10") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 10") "glowColor"; editorTemplate -addControl "glowSpread"; editorTemplate -addSeparator; editorTemplate -addControl "shaderGlow"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorTubes")) -collapse 1; editorTemplate -addControl "tubes" "checkTubes"; editorTemplate -addControl "tubeCompletion"; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kCreation")) -collapse 1; editorTemplate -addControl "tubesPerStep"; editorTemplate -addControl "tubeRand"; editorTemplate -addControl "startTubes"; editorTemplate -addControl "segments"; editorTemplate -addSeparator; editorTemplate -addControl "lengthMin"; editorTemplate -addControl "lengthMax"; editorTemplate -addSeparator; editorTemplate -addControl "tubeWidth1"; editorTemplate -addControl "tubeWidth2"; editorTemplate -addControl "widthRand"; editorTemplate -addControl "widthBias"; editorTemplate -addSeparator; editorTemplate -addControl "segmentLengthBias"; editorTemplate -addControl "segmentWidthBias"; editorTemplate -addSeparator; editorTemplate -addControl "surfaceSnap"; AEaddRampControl ($nodeName+".widthScale"); editorTemplate -addSeparator; editorTemplate -addControl "tubeDirection"; editorTemplate -addControl "elevationMin"; editorTemplate -addControl "elevationMax"; editorTemplate -addControl "azimuthMin"; editorTemplate -addControl "azimuthMax"; editorTemplate -addSeparator; editorTemplate -addControl "simplifyMethod"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kGrowth")) -collapse 1; editorTemplate -addControl "branches" "checkBranches"; editorTemplate -addControl "twigs" "checkTwigs"; editorTemplate -addControl "leaves" "checkLeaves"; editorTemplate -addControl "flowers" "checkFlowers"; editorTemplate -addControl "buds" "checkBuds"; editorTemplate -addControl "sunDirection"; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kBranches")) -collapse 1; editorTemplate -addControl "startBranches"; editorTemplate -addControl "numBranches"; editorTemplate -addControl "splitMaxDepth"; editorTemplate -addControl "branchDropout"; editorTemplate -addControl "splitRand"; editorTemplate -addControl "splitAngle"; editorTemplate -addControl "splitTwist"; editorTemplate -addControl "splitSizeDecay"; editorTemplate -addControl "splitBias"; editorTemplate -addControl "minSize"; editorTemplate -addControl "middleBranch"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kTwigs")) -collapse 1; editorTemplate -addControl "twigsInCluster"; editorTemplate -addControl "numTwigClusters"; editorTemplate -addControl "twigDropout"; editorTemplate -addSeparator; editorTemplate -addControl "twigLength"; editorTemplate -addControl "twigBaseWidth"; editorTemplate -addControl "twigTipWidth"; editorTemplate -addControl "twigStart"; editorTemplate -addControl "twigAngle1"; editorTemplate -addControl "twigAngle2"; editorTemplate -addControl "twigTwist"; editorTemplate -addControl "twigStiffness"; editorTemplate -addControl "branchAfterTwigs"; AEaddRampControl ($nodeName+".twigLengthScale"); editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kLeaves")) -collapse 1; editorTemplate -addControl "leavesInCluster"; editorTemplate -addControl "numLeafClusters"; editorTemplate -addControl "leafDropout"; editorTemplate -addControl "leafLocation"; editorTemplate -addSeparator; editorTemplate -addControl "leafLength"; editorTemplate -addControl "leafBaseWidth"; editorTemplate -addControl "leafTipWidth"; AEaddRampControl ($nodeName+".leafWidthScale"); editorTemplate -addControl "leafStart"; editorTemplate -addControl "leafAngle1"; editorTemplate -addControl "leafAngle2"; editorTemplate -addControl "leafTwist"; editorTemplate -addControl "leafForwardTwist"; editorTemplate -addControl "leafBend"; AEaddRampControl ($nodeName+".leafCurl"); editorTemplate -addControl "leafFaceSun"; editorTemplate -addControl "leafTwirl"; editorTemplate -addControl "leafSegments"; editorTemplate -addControl "leafFlatness"; editorTemplate -addControl "leafSizeDecay"; editorTemplate -addControl "leafSizeRand"; editorTemplate -addControl "leafStiffness"; editorTemplate -addControl "leafTranslucence"; editorTemplate -addControl "leafSpecular"; editorTemplate -addSeparator; $sliderName = attributeName( $nodeName + ".leafColor1" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 11") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 11") "leafColor1"; $sliderName = attributeName( $nodeName + ".leafColor2" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 12") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 12") "leafColor2"; editorTemplate -addControl "leafHueRand"; editorTemplate -addControl "leafSatRand"; editorTemplate -addControl "leafValRand"; editorTemplate -addSeparator; editorTemplate -addControl "leafUseBranchTex" "checkLeafUseBranchTex"; editorTemplate -callCustom "AEbrushTextureNameNew" "AEbrushTextureNameReplace" "leafImage"; editorTemplate -addSeparator; editorTemplate -addControl "terminalLeaf"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kFlowers")) -collapse 1; editorTemplate -addControl "petalsInFlower"; editorTemplate -addControl "numFlowers"; editorTemplate -addControl "petalDropout"; editorTemplate -addControl "flowerLocation"; editorTemplate -addSeparator; editorTemplate -addControl "petalLength"; editorTemplate -addControl "petalBaseWidth"; editorTemplate -addControl "petalTipWidth"; AEaddRampControl ($nodeName+".petalWidthScale"); editorTemplate -addControl "flowerStart"; editorTemplate -addControl "flowerAngle1"; editorTemplate -addControl "flowerAngle2"; editorTemplate -addControl "flowerTwist"; editorTemplate -addControl "petalForwardTwist"; editorTemplate -addControl "petalBend"; AEaddRampControl ($nodeName+".petalCurl"); editorTemplate -addControl "flowerFaceSun"; editorTemplate -addControl "petalTwirl"; editorTemplate -addControl "petalSegments"; editorTemplate -addControl "petalFlatness"; editorTemplate -addControl "flowerSizeDecay"; editorTemplate -addControl "flowerSizeRand"; editorTemplate -addControl "flowerStiffness"; editorTemplate -addSeparator; editorTemplate -addControl "flowerTranslucence"; editorTemplate -addControl "flowerSpecular"; editorTemplate -suppress "petalColor1"; $sliderName = attributeName( $nodeName + ".petalColor1" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 13") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 13") "petalColor1"; $sliderName = attributeName( $nodeName + ".petalColor2" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 14") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 14") "petalColor2"; editorTemplate -addControl "flowerHueRand"; editorTemplate -addControl "flowerSatRand"; editorTemplate -addControl "flowerValRand"; editorTemplate -addSeparator; editorTemplate -addControl "flowerUseBranchTex" "checkFlowerUseBranchTex"; editorTemplate -callCustom "AEbrushTextureNameNew" "AEbrushTextureNameReplace" "flowerImage"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kBuds")) -collapse 1; editorTemplate -addControl "budSize"; $sliderName = attributeName( $nodeName + ".budColor" ); editorTemplate -callCustom ("AEbrushCustomColor1New \""+$sliderName+"\" 15") ("AEbrushCustomColor1Replace \""+$sliderName+"\" 15") "budColor"; editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kBehavior")) -collapse 1; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kDisplacement")) -collapse 1; editorTemplate -addControl "displacementDelay"; editorTemplate -addSeparator; editorTemplate -addControl "noise"; editorTemplate -addControl "noiseFrequency"; editorTemplate -addControl "noiseOffset"; editorTemplate -addSeparator; editorTemplate -addControl "wiggle"; editorTemplate -addControl "wiggleFrequency"; editorTemplate -addControl "wiggleOffset"; editorTemplate -addSeparator; editorTemplate -addControl "curl"; editorTemplate -addControl "curlFrequency"; editorTemplate -addControl "curlOffset"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kForces")) -collapse 1; editorTemplate -addControl "pathFollow"; editorTemplate -addControl "pathAttract"; editorTemplate -addSeparator; editorTemplate -addControl "curveFollow"; editorTemplate -addControl "curveAttract"; editorTemplate -addControl "curveMaxDist"; editorTemplate -addSeparator; editorTemplate -addControl "surfaceAttract" "AEcheckSurfaceAttract"; editorTemplate -addControl "maxAttractDistance"; editorTemplate -addSeparator; editorTemplate -addControl "random"; editorTemplate -addSeparator; editorTemplate -addControl "uniformForce"; editorTemplate -addSeparator; editorTemplate -addControl "gravity"; editorTemplate -addSeparator; editorTemplate -addControl "surfaceCollide" "AEcheckSurfaceCollide"; editorTemplate -addControl "collideMethod"; editorTemplate -addSeparator; editorTemplate -addControl "deflection" "checkDeflection"; editorTemplate -addControl "deflectionMin"; editorTemplate -addControl "deflectionMax"; editorTemplate -addSeparator; editorTemplate -addControl "momentum"; editorTemplate -addSeparator; editorTemplate -addControl "lengthFlex"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kTurbulence")) -collapse 1; editorTemplate -addControl "turbulenceType" "checkTurbulence"; editorTemplate -label (uiRes("m_AEbrushTemplate.kInterpolation")) -addControl "turbulenceInterpolation"; editorTemplate -addControl "turbulence"; editorTemplate -label (uiRes("m_AEbrushTemplate.kFrequency")) -addControl "turbulenceFrequency"; editorTemplate -addControl "turbulenceSpeed"; editorTemplate -addControl "turbulenceOffset"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kSpiral")) -collapse 1; editorTemplate -addControl "spiralMin"; editorTemplate -addControl "spiralMax"; editorTemplate -addControl "spiralDecay"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kBend")) -collapse 1; editorTemplate -addControl "bend"; editorTemplate -addControl "bendBias"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kOccupation")) -collapse 1; editorTemplate -addControl "occupyAttraction" "ae_checkOccupyAttraction"; editorTemplate -addControl "attractRadiusScale"; editorTemplate -addControl "attractRadiusOffset"; editorTemplate -addControl "occupyRadiusScale"; editorTemplate -addControl "occupyRadiusOffset"; editorTemplate -addControl "surfaceSampleDensity"; editorTemplate -addControl "occupyBranchTermination"; editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kLengthMappings")) -collapse 1; editorTemplate -addControl "colorLengthMap"; editorTemplate -addControl "transpLengthMap"; editorTemplate -addControl "incandLengthMap"; editorTemplate -addControl "widthLengthMap"; editorTemplate -addControl "splitLengthMap"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kUserMelScripts")) -collapse 1; editorTemplate -addControl "creationScript"; editorTemplate -addControl "runtimeScript"; editorTemplate -endLayout; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorGaps")) -collapse 1; editorTemplate -addControl "gapSize"; editorTemplate -addControl "gapSpacing"; editorTemplate -addControl "gapRand"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbrushTemplate.kEditorFlowAnimation")) -collapse 1; editorTemplate -addControl "flowSpeed"; editorTemplate -addControl "textureFlow"; editorTemplate -addControl "strokeTime"; editorTemplate -addControl "timeClip" "checkTimeClip"; editorTemplate -label (uiRes("m_AEbrushTemplate.kStartTime")) -addControl "startTime"; editorTemplate -label (uiRes("m_AEbrushTemplate.kEndTime")) -addControl "endTime"; editorTemplate -addControl "time"; editorTemplate -endLayout; // include/call base class/node attributes AEdependNodeTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; editorTemplate -endNoOptimize; } // Dimming Code global proc checkMapping(string $node) { global string $gAEbrushControls[]; int $val1 = `getAttr ($node+".mapColor")`; int $val2 = `getAttr ($node+".mapOpacity")`; int $val3 = `getAttr ($node+".mapDisplacement")`; int $ttype = `getAttr ($node+".textureType")`; float $color1[3] = `getAttr ($node+".color1")`; int $bType = `getAttr ($node+".brushType")`; int $illum = `getAttr ($node+".illuminated")`; $val3 = $val3 && ($bType == 5); //displacement only if meshtype int $val = 1; if ( $val1 + $val2 + $val3 > 0 ){ $val = 0; } if ($val1) { // We are mapping color, so check that color1 is not 0 to insure the effect // of mapping appears. if ($color1[0] == 0 && $color1[1] == 0 && $color1[2] == 0) { // We might want to check to see if the values are attached, but it is unlikely, // so, we do not. setAttr ($node+".color1") 1 1 1; } } editorTemplate -dimControl $node "displacementScale" (!$val3); editorTemplate -dimControl $node "displacementOffset" (!$val3); editorTemplate -dimControl $node "bumpIntensity" (!$val3 || !$illum); editorTemplate -dimControl $node "bumpBlur" (!$val3 || !$illum); editorTemplate -dimControl $node "luminanceIsDisplacement" (!$val3); editorTemplate -dimControl $node "textureType" $val; // editorTemplate -dimControl $node "texColor1" $val; // editorTemplate -dimControl $node "texColor2" $val; // Bug fix #117048. The dangers of using global strings... // // The global string values are not reset to null when the corresponding // controls are deleted. To fix this, simply ensure the control exists // before editting it. 27jul99 - bwk // if (`attrColorSliderGrp -exists $gAEbrushControls[7]`) { attrColorSliderGrp -edit -en ($val1) $gAEbrushControls[7]; } if (`attrColorSliderGrp -exists $gAEbrushControls[8]`) { attrColorSliderGrp -edit -en ($val1) $gAEbrushControls[8]; } editorTemplate -dimControl $node "texColorScale" (!$val1); editorTemplate -dimControl $node "texColorOffset" (!$val1); editorTemplate -dimControl $node "texOpacityScale" (!$val2); editorTemplate -dimControl $node "texOpacityOffset" (!$val2); editorTemplate -dimControl $node "texAlpha1" (!($val2 || $val3)); editorTemplate -dimControl $node "texAlpha2" (!($val2 || $val3)); editorTemplate -dimControl $node "mapMethod" ($val || ($bType > 3)); editorTemplate -dimControl $node "texUniformity" $val; editorTemplate -dimControl $node "repeatU" $val; editorTemplate -dimControl $node "repeatV" $val; editorTemplate -dimControl $node "offsetU" $val; editorTemplate -dimControl $node "offsetV" $val; editorTemplate -dimControl $node "blurMult" $val; editorTemplate -dimControl $node "smear" $val; editorTemplate -dimControl $node "smearU" $val; editorTemplate -dimControl $node "smearV" $val; editorTemplate -dimControl $node "imageName" ($val || $ttype != 4); editorTemplate -dimControl $node "fringeRemoval" ($val || $ttype != 4); editorTemplate -dimControl $node "fractalAmplitude" ($val || $ttype != 3); editorTemplate -dimControl $node "fractalRatio" ($val || $ttype != 3); editorTemplate -dimControl $node "fractalThreshold" ($val || $ttype != 3); } global proc checkIllumination( string $node ) { global string $gAEbrushControls[]; int $val = `getAttr ($node+".illuminated")`; int $diffuse = $val; if( !$diffuse ){ float $lb = `getAttr ($node+".lightingBasedWidth")`; if( $lb > 0.001 || $lb < -0.001) { $diffuse = true; } } int $val2 = `getAttr ($node+".realLights")`; int $tOn = `getAttr ($node+".tubes")`; int $bType = `getAttr ($node+".brushType")`; editorTemplate -dimControl $node "realLights" (!$diffuse); editorTemplate -dimControl $node "lightDirection" (!$diffuse || $val2); editorTemplate -dimControl $node "translucence" (!$val); editorTemplate -dimControl $node "specular" (!$val); editorTemplate -dimControl $node "specularPower" (!$val); // editorTemplate -dimControl $node "specularColor" (!$val); // Bug fix #117048. The dangers of using global strings... // // The global string values are not reset to null when the corresponding // controls are deleted. To fix this, simply ensure the control exists // before editting it. 27jul99 - bwk // if (`attrColorSliderGrp -exists $gAEbrushControls[9]`) { attrColorSliderGrp -edit -en $val $gAEbrushControls[9]; } editorTemplate -dimControl $node "leafTranslucence" (!$val || !$tOn); editorTemplate -dimControl $node "flowerTranslucence" (!$val || !$tOn); editorTemplate -dimControl $node "leafSpecular" (!$val || !$tOn); editorTemplate -dimControl $node "flowerSpecular" (!$val || !$tOn); int $dim =($bType !=4) || (!$val); editorTemplate -dimControl $node "multiStreakSpecularRand" $dim; editorTemplate -dimControl $node "multiStreakLightAll" $dim; // if brush is not mesh, or not illuminated, perPixelLighting is dimmed int $isMesh = ($bType == 5); editorTemplate -dimControl $node "perPixelLighting" (!$isMesh || !$val); } global proc checkFakeShadow( string $node ) { int $val = `getAttr ($node+".fakeShadow")`; int $bType = `getAttr ($node+".brushType")`; int $dim = ($val == 0) || ($bType > 3); editorTemplate -dimControl $node "shadowDiffusion" $dim; editorTemplate -dimControl $node "shadowTransparency" $dim; editorTemplate -dimControl $node "shadowOffset" ($val != 1); } global proc checkBranches ( string $node ) { int $tOn = `getAttr ($node+".tubes")`; int $bOn = `getAttr ($node+".branches")`; int $dim = !$tOn || !$bOn; editorTemplate -dimControl $node "branches" (!$tOn); editorTemplate -dimControl $node "startBranches" $dim; editorTemplate -dimControl $node "numBranches" $dim; editorTemplate -dimControl $node "splitMaxDepth" $dim; editorTemplate -dimControl $node "branchDropout" $dim; editorTemplate -dimControl $node "splitRand" $dim; editorTemplate -dimControl $node "splitAngle" $dim; editorTemplate -dimControl $node "splitTwist" $dim; editorTemplate -dimControl $node "splitSizeDecay" $dim; editorTemplate -dimControl $node "splitBias" $dim; editorTemplate -dimControl $node "splitTwist" $dim; editorTemplate -dimControl $node "minSize" $dim; editorTemplate -dimControl $node "middleBranch" $dim; } global proc checkTwigs ( string $node ) { int $tOn = `getAttr ($node+".tubes")`; int $bOn = `getAttr ($node+".twigs")`; int $dim = !$tOn || !$bOn; int $bType = `getAttr ($node+".brushType")`; int $isMesh = ($bType == 5); editorTemplate -dimControl $node "twigs" (!$tOn); editorTemplate -dimControl $node "twigsInCluster" $dim; editorTemplate -dimControl $node "numTwigClusters" $dim; editorTemplate -dimControl $node "twigDropout" $dim; editorTemplate -dimControl $node "twigLength" $dim; editorTemplate -dimControl $node "twigBaseWidth" $dim; editorTemplate -dimControl $node "twigTipWidth" $dim; editorTemplate -dimControl $node "twigStart" $dim; editorTemplate -dimControl $node "twigAngle1" $dim; editorTemplate -dimControl $node "twigAngle2" $dim; editorTemplate -dimControl $node "twigTwist" $dim; editorTemplate -dimControl $node "twigStiffness" $dim; editorTemplate -dimControl $node "twigThorns" ($dim || !$isMesh); editorTemplate -dimControl $node "branchAfterTwigs" $dim; editorTemplate -dimControl $node "twigLengthScale" $dim; editorTemplate -dimControl $node "twigLengthScale_Interp" $dim; } global proc checkLeafUseBranchTex ( string $node ) { global string $gAEbrushControls[]; int $tOn = `getAttr ($node+".tubes")`; int $lOn = `getAttr ($node+".leaves")`; int $uOn = `getAttr ($node+".leafUseBranchTex")`; int $dim = !$tOn || !$lOn || $uOn; editorTemplate -dimControl $node "leafImage" $dim; } global proc checkLeaves ( string $node ) { global string $gAEbrushControls[]; int $tOn = `getAttr ($node+".tubes")`; int $lOn = `getAttr ($node+".leaves")`; int $iOn = `getAttr ($node+".illuminated")`; int $dim = !$tOn || !$lOn; int $bType = `getAttr ($node+".brushType")`; int $isMesh = ($bType == 5); editorTemplate -dimControl $node "leaves" (!$tOn); editorTemplate -dimControl $node "leavesInCluster" $dim; editorTemplate -dimControl $node "numLeafClusters" $dim; editorTemplate -dimControl $node "leafDropout" $dim; editorTemplate -dimControl $node "leafLength" $dim; editorTemplate -dimControl $node "leafBaseWidth" $dim; editorTemplate -dimControl $node "leafTipWidth" $dim; editorTemplate -dimControl $node "leafStart" $dim; editorTemplate -dimControl $node "leafAngle1" $dim; editorTemplate -dimControl $node "leafAngle2" $dim; editorTemplate -dimControl $node "leafTwist" $dim; editorTemplate -dimControl $node "leafSegments" $dim; editorTemplate -dimControl $node "leafFlatness" $dim; editorTemplate -dimControl $node "leafSizeDecay" $dim; editorTemplate -dimControl $node "leafSizeRand" $dim; editorTemplate -dimControl $node "leafTranslucence" ($dim || !$iOn); editorTemplate -dimControl $node "terminalLeaf" $dim; editorTemplate -dimControl $node "leafWidthScale" $dim; editorTemplate -dimControl $node "leafWidthScale_Interp" $dim; editorTemplate -dimControl $node "leafBend" $dim; editorTemplate -dimControl $node "leafCurl" $dim; editorTemplate -dimControl $node "leafCurl_Interp" $dim; editorTemplate -dimControl $node "leafTwirl" $dim; editorTemplate -dimControl $node "leafFaceSun" $dim; editorTemplate -dimControl $node "leafStiffness" $dim; editorTemplate -dimControl $node "leafSpecular" ($dim || (!$iOn)); editorTemplate -dimControl $node "leafThorns" ($dim || (!$isMesh)); editorTemplate -dimControl $node "leafReflectivity" ($dim || (!$isMesh)); // editorTemplate -dimControl $node "leafColor1" $dim; // editorTemplate -dimControl $node "leafColor2" $dim; // Bug fix #117048. The dangers of using global strings... // // The global string values are not reset to null when the corresponding // controls are deleted. To fix this, simply ensure the control exists // before editting it. 27jul99 - bwk // if (`attrColorSliderGrp -exists $gAEbrushControls[11]`) { attrColorSliderGrp -edit -en (!$dim) $gAEbrushControls[11]; } if (`attrColorSliderGrp -exists $gAEbrushControls[12]`) { attrColorSliderGrp -edit -en (!$dim) $gAEbrushControls[12]; } editorTemplate -dimControl $node "leafHueRand" $dim; editorTemplate -dimControl $node "leafSatRand" $dim; editorTemplate -dimControl $node "leafValRand" $dim; editorTemplate -dimControl $node "leafUseBranchTex" $dim; checkLeafUseBranchTex( $node ); } global proc checkType ( string $node ) { // Temporary Maya 2.5 fix for bug #117249. Ensure the object exists to // prevent error message from being printed. // 09aug99 - bwk // if (!`objExists $node`) return; int $bType = `getAttr ($node+".brushType")`; int $illum = `getAttr ($node+".illuminated")`; int $leaves = `getAttr ($node+".leaves")`; int $flowers = `getAttr ($node+".flowers")`; int $tubes = `getAttr ($node+".tubes")`; $leaves = $leaves && $tubes; $flowers = $flowers && $tubes; editorTemplate -dimControl $node "blurIntensity" (!($bType == 2)); int $isThinLine = ($bType == 4); int $isMesh = ($bType == 5); editorTemplate -dimControl $node "stampDensity" ($bType > 3); editorTemplate -dimControl $node "edgeAntialias" ($bType > 3); editorTemplate -dimControl $node "occlusionWidthScale" ($bType > 3); checkThorns( $node ); checkFakeShadow( $node ); checkMapping( $node ); int $dim = !$isThinLine; editorTemplate -dimControl $node "multiStreaks" $dim; editorTemplate -dimControl $node "multiStreakSpread1" $dim; editorTemplate -dimControl $node "multiStreakSpread2" ($dim || !$tubes); editorTemplate -dimControl $node "multiStreakDiffuseRand" $dim; editorTemplate -dimControl $node "multiStreakSpecularRand" ($dim || (!$illum)); editorTemplate -dimControl $node "multiStreakLightAll" ($dim || (!$illum)); $dim = $isThinLine; editorTemplate -dimControl $node "flatness1" $dim; editorTemplate -dimControl $node "flatness2" ($dim || !$tubes); editorTemplate -dimControl $node "softness" $dim; $dim = !$isMesh; editorTemplate -dimControl $node "environment" $dim; editorTemplate -dimControl $node "environment_Interp" $dim; editorTemplate -dimControl $node "reflectionRolloff" $dim; editorTemplate -dimControl $node "reflectionRolloff_Interp" $dim; editorTemplate -dimControl $node "branchReflectivity" $dim; editorTemplate -dimControl $node "leafReflectivity" ($dim || (!$leaves)); editorTemplate -dimControl $node "flowerReflectivity" ($dim || (!$flowers)); editorTemplate -dimControl $node "singleSided" $dim; editorTemplate -dimControl $node "perPixelLighting" ($dim || (!$illum)); } global proc checkThorns( string $node ) { int $bType = `getAttr ($node+".brushType")`; int $flowers = `getAttr ($node+".flowers")`; int $leaves = `getAttr ($node+".leaves")`; int $twigs = `getAttr ($node+".twigs")`; int $tubes = `getAttr ($node+".tubes")`; $leaves = $leaves && $tubes; $flowers = $flowers && $tubes; $twigs = $twigs && $tubes; int $isMesh = ($bType == 5); int $dim = !$isMesh; editorTemplate -dimControl $node "branchThorns" $dim; editorTemplate -dimControl $node "twigThorns" ($dim || !$twigs); editorTemplate -dimControl $node "leafThorns" ($dim || !$leaves); editorTemplate -dimControl $node "flowerThorns" ($dim || !$flowers); if( !$dim ){ int $isThorn = (`getAttr ($node+".branchThorns")` || `getAttr ($node+".twigThorns")` || `getAttr ($node+".leafThorns")` || `getAttr ($node+".flowerThorns")`); $dim = $dim || (!$isThorn); } editorTemplate -dimControl $node "thornDensity" $dim; editorTemplate -dimControl $node "thornElevation" $dim; editorTemplate -dimControl $node "thornLength" $dim; editorTemplate -dimControl $node "thornBaseWidth" $dim; editorTemplate -dimControl $node "thornTipWidth" $dim; editorTemplate -dimControl $node "thornSpecular" $dim; editorTemplate -dimControl $node "thornBaseColor" $dim; editorTemplate -dimControl $node "thornTipColor" $dim; } global proc checkDepth ( string $node ) { int $dOn = `getAttr ($node+".depth")`; editorTemplate -dimControl $node "modifyDepth" (!$dOn); } global proc checkFlowerUseBranchTex ( string $node ) { global string $gAEbrushControls[]; int $tOn = `getAttr ($node+".tubes")`; int $lOn = `getAttr ($node+".flowers")`; int $uOn = `getAttr ($node+".flowerUseBranchTex")`; int $dim = !$tOn || !$lOn || $uOn; editorTemplate -dimControl $node "flowerImage" $dim; } global proc checkFlowers ( string $node ) { global string $gAEbrushControls[]; int $tOn = `getAttr ($node+".tubes")`; int $fOn = `getAttr ($node+".flowers")`; int $iOn = `getAttr ($node+".illuminated")`; int $dim = !$tOn || !$fOn; int $bType = `getAttr ($node+".brushType")`; int $isMesh = ($bType == 5); editorTemplate -dimControl $node "flowers" (!$tOn); editorTemplate -dimControl $node "petalsInFlower" $dim; editorTemplate -dimControl $node "numFlowers" $dim; editorTemplate -dimControl $node "petalDropout" $dim; editorTemplate -dimControl $node "petalLength" $dim; editorTemplate -dimControl $node "petalBaseWidth" $dim; editorTemplate -dimControl $node "petalTipWidth" $dim; editorTemplate -dimControl $node "flowerStart" $dim; editorTemplate -dimControl $node "flowerAngle1" $dim; editorTemplate -dimControl $node "flowerAngle2" $dim; editorTemplate -dimControl $node "flowerTwist" $dim; editorTemplate -dimControl $node "petalSegments" $dim; editorTemplate -dimControl $node "petalFlatness" $dim; editorTemplate -dimControl $node "flowerSizeDecay" $dim; editorTemplate -dimControl $node "flowerSizeRand" $dim; editorTemplate -dimControl $node "flowerTranslucence" ($dim || !$iOn); editorTemplate -dimControl $node "flowerSpecular" ($dim || !$iOn); editorTemplate -dimControl $node "flowerThorns" ($dim || !$isMesh); editorTemplate -dimControl $node "flowerReflectivity" ($dim || (!$isMesh)); editorTemplate -dimControl $node "petalWidthScale" $dim; editorTemplate -dimControl $node "petalWidthScale_Interp" $dim; editorTemplate -dimControl $node "petalBend" $dim; editorTemplate -dimControl $node "petalCurl" $dim; editorTemplate -dimControl $node "petalCurl_Interp" $dim; editorTemplate -dimControl $node "petalTwirl" $dim; editorTemplate -dimControl $node "flowerFaceSun" $dim; editorTemplate -dimControl $node "flowerStiffness" $dim; // editorTemplate -dimControl $node "petalColor1" $dim; // editorTemplate -dimControl $node "petalColor2" $dim; // Bug fix #117048. The dangers of using global strings... // // The global string values are not reset to null when the corresponding // controls are deleted. To fix this, simply ensure the control exists // before editting it. 27jul99 - bwk // if (`attrColorSliderGrp -exists $gAEbrushControls[13]`) { attrColorSliderGrp -edit -en (!$dim) $gAEbrushControls[13]; } if (`attrColorSliderGrp -exists $gAEbrushControls[14]`) { attrColorSliderGrp -edit -en (!$dim) $gAEbrushControls[14]; } editorTemplate -dimControl $node "flowerHueRand" $dim; editorTemplate -dimControl $node "flowerSatRand" $dim; editorTemplate -dimControl $node "flowerValRand" $dim; editorTemplate -dimControl $node "flowerUseBranchTex" $dim; checkFlowerUseBranchTex( $node ); } global proc checkBuds ( string $node ) { global string $gAEbrushControls[]; int $tOn = `getAttr ($node+".tubes")`; int $bOn = `getAttr ($node+".buds")`; int $dim = !$tOn || !$bOn; editorTemplate -dimControl $node "buds" (!$tOn); editorTemplate -dimControl $node "budSize" $dim; // editorTemplate -dimControl $node "budColor" $dim; // Bug fix #117048. The dangers of using global strings... // // The global string values are not reset to null when the corresponding // controls are deleted. To fix this, simply ensure the control exists // before editting it. 27jul99 - bwk // if (`attrColorSliderGrp -exists $gAEbrushControls[15]`) { attrColorSliderGrp -edit -en (!$dim) $gAEbrushControls[15]; } } global proc checkDeflection ( string $node ) { int $tOn = `getAttr ($node+".tubes")`; int $dOn = `getAttr ($node+".deflection")`; int $dim = !$tOn || !$dOn; editorTemplate -dimControl $node "deflection" (!$tOn); editorTemplate -dimControl $node "deflectionMin" $dim; editorTemplate -dimControl $node "deflectionMax" $dim; } global proc checkTurbulence ( string $node ) { int $tOn = `getAttr ($node+".tubes")`; int $ttOn = `getAttr ($node+".turbulenceType")`; int $dim = !$tOn || ($ttOn == 0); editorTemplate -dimControl $node "turbulenceType" (!$tOn); editorTemplate -dimControl $node "turbulenceInterpolation" $dim; editorTemplate -dimControl $node "turbulence" $dim; editorTemplate -dimControl $node "turbulenceFrequency" $dim; editorTemplate -dimControl $node "turbulenceSpeed" $dim; editorTemplate -dimControl $node "turbulenceOffset" $dim; } global proc ae_checkOccupyAttraction ( string $node ) { int $tOn = `getAttr ($node+".tubes")`; float $oa = `getAttr ($node+".occupyAttraction")`; int $dim = !$tOn || ($oa == 0.0); editorTemplate -dimControl $node "occupyAttraction" (!$tOn); editorTemplate -dimControl $node "occupyRadiusScale" $dim; editorTemplate -dimControl $node "occupyRadiusOffset" $dim; editorTemplate -dimControl $node "attractRadiusScale" $dim; editorTemplate -dimControl $node "attractRadiusOffset" $dim; editorTemplate -dimControl $node "surfaceSampleDensity" $dim; editorTemplate -dimControl $node "occupyBranchTermination" $dim; } global proc checkTimeClip ( string $node ) { int $tOn = `getAttr ($node+".timeClip")`; int $dim = !$tOn; editorTemplate -dimControl $node "startTime" $dim; editorTemplate -dimControl $node "endTime" $dim; } global proc checkScreenspaceWidth ( string $node ) { int $sOn = `getAttr ($node+".screenspaceWidth")`; int $dim = !$sOn; editorTemplate -dimControl $node "distanceScaling" $dim; editorTemplate -dimControl $node "minPixelWidth" $dim; editorTemplate -dimControl $node "maxPixelWidth" $dim; } global proc checkEdgeClip ( string $node ) { int $sOn = `getAttr ($node+".edgeClip")`; editorTemplate -dimControl $node "edgeClipDepth" (!$sOn); } global proc AEcheckSurfaceAttract ( string $node ) { int $tOn = `getAttr ($node+".tubes")`; float $sa = `getAttr ($node+".surfaceAttract")`; editorTemplate -dimControl $node "maxAttractDistance" (($sa==0.0) || !$tOn); } global proc AEcheckSurfaceCollide ( string $node ) { int $tOn = `getAttr ($node+".tubes")`; int $sc = `getAttr ($node+".surfaceCollide")`; editorTemplate -dimControl $node "collideMethod" ( !$sc || !$tOn); } global proc checkTubes ( string $node ) { global string $gAEbrushControls[]; int $tOn = `getAttr ($node+".tubes")`; int $tOff = !$tOn; int $bType = `getAttr ($node+".brushType")`; int $isThinLine = ($bType == 4); editorTemplate -dimControl $node "tubeCompletion" $tOff; editorTemplate -dimControl $node "simplifyMethod" $tOff; editorTemplate -dimControl $node "tubesPerStep" $tOff; editorTemplate -dimControl $node "startTubes" $tOff; editorTemplate -dimControl $node "lengthMin" $tOff; editorTemplate -dimControl $node "lengthMax" $tOff; editorTemplate -dimControl $node "tubeWidth1" $tOff; editorTemplate -dimControl $node "tubeWidth2" $tOff; editorTemplate -dimControl $node "widthRand" $tOff; editorTemplate -dimControl $node "widthBias" $tOff; editorTemplate -dimControl $node "segments" $tOff; editorTemplate -dimControl $node "segmentLengthBias" $tOff; editorTemplate -dimControl $node "segmentWidthBias" $tOff; editorTemplate -dimControl $node "tubeDirection" $tOff; editorTemplate -dimControl $node "tubeRand" $tOff; editorTemplate -dimControl $node "elevationMin" $tOff; editorTemplate -dimControl $node "elevationMax" $tOff; editorTemplate -dimControl $node "azimuthMin" $tOff; editorTemplate -dimControl $node "azimuthMax" $tOff; editorTemplate -dimControl $node "surfaceSnap" $tOff; // editorTemplate -dimControl $node "color2" $tOff; // editorTemplate -dimControl $node "incandescence2" $tOff; // editorTemplate -dimControl $node "transparency2" $tOff; // Bug fix #117048. The dangers of using global strings... // // The global string values are not reset to null when the corresponding // controls are deleted. To fix this, simply ensure the control exists // before editting it. 27jul99 - bwk // if (`attrColorSliderGrp -exists $gAEbrushControls[4]`) { attrColorSliderGrp -edit -en $tOn $gAEbrushControls[4]; } if (`attrColorSliderGrp -exists $gAEbrushControls[5]`) { attrColorSliderGrp -edit -en $tOn $gAEbrushControls[5]; } if (`attrColorSliderGrp -exists $gAEbrushControls[6]`) { attrColorSliderGrp -edit -en $tOn $gAEbrushControls[6]; } editorTemplate -dimControl $node "flatness2" ($tOff || $isThinLine); editorTemplate -dimControl $node "brightnessRand" $tOff; editorTemplate -dimControl $node "rootFade" $tOff; editorTemplate -dimControl $node "tipFade" $tOff; editorTemplate -dimControl $node "hueRand" $tOff; editorTemplate -dimControl $node "satRand" $tOff; editorTemplate -dimControl $node "valRand" $tOff; checkBranches( $node ); checkTwigs( $node ); checkLeaves( $node ); checkFlowers( $node ); checkBuds( $node ); editorTemplate -dimControl $node "displacementDelay" $tOff; editorTemplate -dimControl $node "noise" $tOff; editorTemplate -dimControl $node "noiseFrequency" $tOff; editorTemplate -dimControl $node "noiseOffset" $tOff; editorTemplate -dimControl $node "wiggle" $tOff; editorTemplate -dimControl $node "wiggleFrequency" $tOff; editorTemplate -dimControl $node "wiggleOffset" $tOff; editorTemplate -dimControl $node "curl" $tOff; editorTemplate -dimControl $node "curlFrequency" $tOff; editorTemplate -dimControl $node "curlOffset" $tOff; editorTemplate -dimControl $node "pathFollow" $tOff; editorTemplate -dimControl $node "pathAttract" $tOff; editorTemplate -dimControl $node "curveFollow" $tOff; editorTemplate -dimControl $node "curveAttract" $tOff; editorTemplate -dimControl $node "curveMaxDist" $tOff; editorTemplate -dimControl $node "surfaceAttract" $tOff; AEcheckSurfaceAttract( $node ); editorTemplate -dimControl $node "random" $tOff; editorTemplate -dimControl $node "uniformForce" $tOff; editorTemplate -dimControl $node "gravity" $tOff; editorTemplate -dimControl $node "surfaceCollide" $tOff; AEcheckSurfaceCollide( $node ); editorTemplate -dimControl $node "twistRand" $tOff; checkDeflection( $node ); editorTemplate -dimControl $node "momentum" $tOff; editorTemplate -dimControl $node "lengthFlex" $tOff; checkTurbulence( $node ); ae_checkOccupyAttraction( $node ); editorTemplate -dimControl $node "spiralMin" $tOff; editorTemplate -dimControl $node "spiralMax" $tOff; editorTemplate -dimControl $node "spiralDecay" $tOff; checkTimeClip( $node ); editorTemplate -dimControl $node "colorLengthMap" $tOff; editorTemplate -dimControl $node "transpLengthMap" $tOff; editorTemplate -dimControl $node "incandLengthMap" $tOff; editorTemplate -dimControl $node "widthLengthMap" $tOff; editorTemplate -dimControl $node "splitLengthMap" $tOff; editorTemplate -dimControl $node "creationScript" $tOff; editorTemplate -dimControl $node "runtimeScript" $tOff; editorTemplate -dimControl $node "multiStreakSpread2" ($tOff || !$isThinLine); }