// =========================================================================== // 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: // AEparticleCloudTemplate // // Description Name; // Creates the attribute editor controls for the particleCloud Node // // Input Value: // nodeName // // Output Value: // None // global proc AEstandardControlsNew ( string $color, string $transparency, string $incandescence ) { setUITemplate -pst attributeEditorTemplate; string $colorLabel = (uiRes("m_AEparticleCloudTemplate.kColor")); string $transparencyLabel = (uiRes("m_AEparticleCloudTemplate.kTransparency")); string $incandescenceLabel = (uiRes("m_AEparticleCloudTemplate.kIncandescene")); if (`licenseCheck -mode edit -type fx`) { attrColorSliderGrp -label $colorLabel -at $color particleColorControl; attrColorSliderGrp -label $transparencyLabel -at $transparency particleTransparencyControl; attrColorSliderGrp -label $incandescenceLabel -at $incandescence particleIncandescenceControl; } else { attrColorSliderGrp -label $colorLabel -at $color -enable false particleColorControl; attrColorSliderGrp -label $transparencyLabel -at $transparency -enable false particleTransparencyControl; attrColorSliderGrp -label $incandescenceLabel -at $incandescence -enable false particleIncandescenceControl; } setUITemplate -ppt; } global proc AEstandardControlsReplace ( string $color, string $transparency, string $incandescence ) { attrColorSliderGrp -edit -at $color particleColorControl; attrColorSliderGrp -edit -at $transparency particleTransparencyControl; attrColorSliderGrp -edit -at $incandescence particleIncandescenceControl; } global proc AElifeControlsNew ( string $color, string $transparency, string $incandescence ) { setUITemplate -pst attributeEditorTemplate; string $lifeColor = (uiRes("m_AEparticleCloudTemplate.kLifeColor")); string $lifeTransparency = (uiRes("m_AEparticleCloudTemplate.kLifeTransparency")); string $lifeIncandesence = (uiRes("m_AEparticleCloudTemplate.kLifeIncandescence")); if (`licenseCheck -mode edit -type fx`) { attrNavigationControlGrp -label $lifeColor -and $color "particleSamplerInfo" lifeColorControl; attrNavigationControlGrp -label $lifeTransparency -and $transparency "particleSamplerInfo" lifeTransparencyControl; attrNavigationControlGrp -label $lifeIncandesence -and $incandescence "particleSamplerInfo" lifeIncandescenceControl; } else { attrNavigationControlGrp -label $lifeColor -and $color "particleSamplerInfo" -enable false lifeColorControl; attrNavigationControlGrp -label $lifeTransparency -and $transparency "particleSamplerInfo" -enable false lifeTransparencyControl; attrNavigationControlGrp -label $lifeIncandesence -and $incandescence "particleSamplerInfo" -enable false lifeIncandescenceControl; } setUITemplate -ppt; } global proc AElifeControlsReplace ( string $color, string $transparency, string $incandescence ) { attrNavigationControlGrp -edit -and $color "particleSamplerInfo" lifeColorControl; attrNavigationControlGrp -edit -and $transparency "particleSamplerInfo" lifeTransparencyControl; attrNavigationControlGrp -edit -and $incandescence "particleSamplerInfo" lifeIncandescenceControl; } global proc licenseGlowIntensity ( string $nodeName ) { if (!`licenseCheck -mode edit -type fx`) editorTemplate -dimControl $nodeName "glowIntensity" true; } global proc licenseDensity ( string $nodeName ) { if (!`licenseCheck -mode edit -type fx`) editorTemplate -dimControl $nodeName "density" true; } global proc licenseNoise ( string $nodeName ) { if (!`licenseCheck -mode edit -type fx`) { editorTemplate -dimControl $nodeName "noise" true; editorTemplate -dimControl $nodeName "noiseFreq" true; editorTemplate -dimControl $nodeName "noiseAspect" true; editorTemplate -dimControl $nodeName "noiseAnimRate" true; editorTemplate -dimControl $nodeName "solidCoreSize" true; } else { string $nodeAttr = $nodeName + ".noise"; // Dim out noise only if it is 0.0 and not connected. // If it is connected, it is probably to a ramp or param // curve and we want to leave the other attributes enabled, // even if the value at this moment happens to be 0.0. // float $noise = `getAttr $nodeAttr`; string $conn[] = `listConnections $nodeAttr`; if( (size($conn) == 0) && ($noise == 0.0) ) { editorTemplate -dimControl $nodeName "noise" false; editorTemplate -dimControl $nodeName "noiseFreq" true; editorTemplate -dimControl $nodeName "noiseAspect" true; editorTemplate -dimControl $nodeName "noiseAnimRate" true; editorTemplate -dimControl $nodeName "solidCoreSize" true; } else { editorTemplate -dimControl $nodeName "noise" false; editorTemplate -dimControl $nodeName "noiseFreq" false; editorTemplate -dimControl $nodeName "noiseAspect" false; editorTemplate -dimControl $nodeName "noiseAnimRate" false; editorTemplate -dimControl $nodeName "solidCoreSize" false; } } } global proc licenseBlobMap ( string $nodeName ) { if (!`licenseCheck -mode edit -type fx`) editorTemplate -dimControl $nodeName "blobMap" true; } global proc licenseFilterRadius ( string $nodeName ) { if (!`licenseCheck -mode edit -type fx`) editorTemplate -dimControl $nodeName "filterRadius" true; } global proc licenseTranslucence ( string $nodeName ) { if (!`licenseCheck -mode edit -type fx`) editorTemplate -dimControl $nodeName "translucence" true; } global proc licenseDiffuseCoeff ( string $nodeName ) { if (!`licenseCheck -mode edit -type fx`) { editorTemplate -dimControl $nodeName "diffuseCoeff" true; editorTemplate -dimControl $nodeName "surfaceColor" true; editorTemplate -dimControl $nodeName "normalCamera" true; editorTemplate -dimControl $nodeName "translucenceCoeff" true; editorTemplate -dimControl $nodeName "surfaceShadingShadow" true; } else { // Dim out diffuse coeff only if it is 0.0 and not connected. // If it is connected, it is probably to a ramp or param // curve and we want to leave the other attributes enabled, // even if the value at this moment happens to be 0.0. // string $nodeAttr = $nodeName + ".diffuseCoeff"; float $diffuseCoeff = `getAttr $nodeAttr`; string $conn[] = `listConnections $nodeAttr`; if( (size($conn) == 0) && ($diffuseCoeff == 0.0) ) { editorTemplate -dimControl $nodeName "diffuseCoeff" false; editorTemplate -dimControl $nodeName "surfaceColor" true; editorTemplate -dimControl $nodeName "normalCamera" true; editorTemplate -dimControl $nodeName "translucenceCoeff" true; editorTemplate -dimControl $nodeName "surfaceShadingShadow" true; } else { editorTemplate -dimControl $nodeName "diffuseCoeff" false; editorTemplate -dimControl $nodeName "surfaceColor" false; editorTemplate -dimControl $nodeName "normalCamera" false; editorTemplate -dimControl $nodeName "translucenceCoeff" false; editorTemplate -dimControl $nodeName "surfaceShadingShadow" false; } } } global proc licenseRoundness ( string $nodeName ) { if (!`licenseCheck -mode edit -type fx`) editorTemplate -dimControl $nodeName "roundness" true; } // // Procedure Name: // AEshaderBumpNew2 // global proc AEshaderBumpNew2 (string $attrName) { setUITemplate -pst attributeEditorTemplate; attrNavigationControlGrp -label (uiRes("m_AEparticleCloudTemplate.kBumpMapping")) -at $attrName bumpControl; setUITemplate -ppt; } // // Procedure Name: // AEshaderBumpReplace2 // global proc AEshaderBumpReplace2 (string $attrName) { attrNavigationControlGrp -edit -at $attrName bumpControl; } // // Procedure Name: // AElambertCommon // global proc AEparticleCloudTemplate ( string $nodeName ) { AEswatchDisplay $nodeName; editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEparticleCloudTemplate.kCommonMaterialAttr")) -collapse 0; editorTemplate -callCustom "AEstandardControlsNew" "AEstandardControlsReplace" "color" "transparency" "incandescence"; editorTemplate -callCustom "AElifeControlsNew" "AElifeControlsReplace" "color" "transparency" "incandescence"; editorTemplate -addControl "glowIntensity" licenseGlowIntensity; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEparticleCloudTemplate.kTransparencyLayout")) -collapse 0; editorTemplate -addControl "density" licenseDensity; editorTemplate -addControl "blobMap" licenseBlobMap; editorTemplate -addControl "roundness" licenseRoundness; editorTemplate -addControl "translucence" licenseTranslucence; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEparticleCloudTemplate.kBuiltInNoise")) -collapse 0; editorTemplate -addControl "noise" licenseNoise; editorTemplate -addControl "noiseFreq"; editorTemplate -addControl "noiseAspect"; editorTemplate -addControl "noiseAnimRate"; editorTemplate -addControl "solidCoreSize"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEparticleCloudTemplate.kSurfaceShadingProperties")) -collapse 0; editorTemplate -addControl "diffuseCoeff" licenseDiffuseCoeff; editorTemplate -addControl "surfaceColor"; editorTemplate -callCustom "AEshaderBumpNew2" "AEshaderBumpReplace2" "normalCamera"; editorTemplate -addControl "translucenceCoeff"; editorTemplate -addControl "surfaceShadingShadow"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEparticleCloudTemplate.kPreilluminationControls")) -collapse 1; editorTemplate -addControl "filterRadius" licenseFilterRadius; editorTemplate -endLayout; editorTemplate -suppress "renderState"; // include/call base class/node attributes AEdependNodeTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }