// =========================================================================== // 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: 2011 // // Procedure Name: // AEmandelbrotTemplate // // Description Name; // Creates the attribute editor controls for the mandelbrot Node // // Input Value: // nodeName // // Output Value: // None // global proc AEmandelbrotDimType( string $nodeName ) { int $type = `getAttr ($nodeName + ".mandelbrotType")`; int $notBox = $type < 2; int $notJulia = $type != 0 && $type != 3; editorTemplate -dimControl $nodeName "lobes" ($type == 2); editorTemplate -dimControl $nodeName "juliaU" $notJulia; editorTemplate -dimControl $nodeName "juliaV" $notJulia; editorTemplate -dimControl $nodeName "boxRadius" $notBox; editorTemplate -dimControl $nodeName "boxMinRadius" $notBox; editorTemplate -dimControl $nodeName "boxRatio" $notBox; } global proc AEmandelOrbitMapDimType( string $nodeName ) { int $om = `getAttr ($nodeName + ".orbitMapping")`; editorTemplate -dimControl $nodeName "orbitMap" (!$om); editorTemplate -dimControl $nodeName "orbitMapColoring" (!$om); editorTemplate -dimControl $nodeName "points" $om; editorTemplate -dimControl $nodeName "circles" $om; editorTemplate -dimControl $nodeName "circleRadius" $om; editorTemplate -dimControl $nodeName "circleSizeRatio" $om; editorTemplate -dimControl $nodeName "stalksU" $om; editorTemplate -dimControl $nodeName "stalksV" $om; editorTemplate -dimControl $nodeName "lineOffsetRatio" $om; editorTemplate -dimControl $nodeName "lineFocus" $om; editorTemplate -dimControl $nodeName "lineBlending" $om; editorTemplate -dimControl $nodeName "checker" $om; editorTemplate -dimControl $nodeName "shift" $om; editorTemplate -dimControl $nodeName "amplitude" $om; editorTemplate -dimControl $nodeName "wrapAmplitude" $om; } global proc AEmandelMapNew (string $attrName ) { setUITemplate -pst attributeEditorTemplate; attrNavigationControlGrp -label (uiRes("m_AEmandelbrotTemplate.kOrbitMap")) -at $attrName orbitMapControl; setUITemplate -ppt; } global proc AEmandelMapReplace (string $attrName ) { attrNavigationControlGrp -edit -at $attrName orbitMapControl; } global proc AEmandelbrotTemplate ( string $nodeName ) { AEswatchDisplay $nodeName; editorTemplate -beginScrollLayout; editorTemplate -suppress "orbitMap"; editorTemplate -beginLayout (uiRes("m_AEmandelbrotTemplate.kMandelbrotAttr")) -collapse 0; editorTemplate -addControl "mandelbrotType" "AEmandelbrotDimType"; editorTemplate -addControl "mandelbrotShadeMethod"; editorTemplate -addControl "mandelbrotInsideMethod"; editorTemplate -addControl "zoomFactor"; editorTemplate -addControl "centerU"; editorTemplate -addControl "centerV"; editorTemplate -addControl "fineOffsetU"; editorTemplate -addControl "fineOffsetV"; editorTemplate -addControl "depth"; editorTemplate -addControl "lobes"; editorTemplate -addControl "escapeRadius"; editorTemplate -addControl "leafEffect"; editorTemplate -addControl "checker"; editorTemplate -addSeparator; editorTemplate -addControl "points"; editorTemplate -addControl "circles"; editorTemplate -addControl "circleRadius"; editorTemplate -addControl "circleSizeRatio"; editorTemplate -addControl "stalksU"; editorTemplate -addControl "stalksV"; editorTemplate -addControl "lineOffsetU"; editorTemplate -addControl "lineOffsetV"; editorTemplate -addControl "lineOffsetRatio"; editorTemplate -addControl "lineFocus"; editorTemplate -addControl "lineBlending"; editorTemplate -addSeparator; editorTemplate -addControl "juliaU"; editorTemplate -addControl "juliaV"; editorTemplate -addSeparator; editorTemplate -addControl "boxRadius"; editorTemplate -addControl "boxMinRadius"; editorTemplate -addControl "boxRatio"; editorTemplate -addSeparator; editorTemplate -addControl "focus"; editorTemplate -addControl "shift"; editorTemplate -addControl "amplitude"; editorTemplate -addControl "wrapAmplitude"; AEaddRampControl ($nodeName+".color"); AEaddRampControl ($nodeName+".value"); editorTemplate -addControl "orbitMapping" "AEmandelOrbitMapDimType"; editorTemplate -addControl "orbitMapColoring"; editorTemplate -callCustom "AEmandelMapNew" "AEmandelMapReplace" "orbitMap"; editorTemplate -addSeparator; editorTemplate -addControl "implode"; editorTemplate -addControl "implodeCenter"; editorTemplate -endLayout; // include/call base class/node attributes AEtexture2dCommon $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }