// =========================================================================== // 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. // =========================================================================== // // provided at the time of installation or download, or which otherwise accompanies // // Procedures specifying the UI layout for ilrOccSampler // in Maya's Attribute Editor // global proc AEilrOccSamplerNormalNew(string $attr) { attrNavigationControlGrp -l "Bump Mapping" -dragCallback "AEdragCallback" AEilrOccSamplerNormalControl; AEilrOccSamplerNormalReplace $attr; } global proc AEilrOccSamplerNormalReplace(string $attr) { attrNavigationControlGrp -edit -at $attr AEilrOccSamplerNormalControl; } global proc AEilrUpdateOccSampler(string $node) { int $dim = (!`getAttr ($node + ".enableAdaptiveSampling")`); int $dim1 = (`getAttr ($node + ".type")` == 1); int $dim2 = ((`getAttr ($node + ".bendNormals")`) || $dim1); int $dim3 = (`getAttr ($node + ".useFile")` == 0); editorTemplate -dimControl $node "enableAdaptiveSampling" $dim2; editorTemplate -dimControl $node "accuracy" ($dim||$dim2); editorTemplate -dimControl $node "smooth" ($dim||$dim2); editorTemplate -dimControl $node "useFile" ($dim||$dim2); editorTemplate -dimControl $node "file" ($dim||$dim2||$dim3); editorTemplate -dimControl $node "bendNormals" $dim1; } global proc AEilrOccSamplerTemplate(string $node) { editorTemplate -beginScrollLayout; editorTemplate -beginLayout "Occlusion Type" -collapse false; editorTemplate -l "Type" -ac "type" "AEilrUpdateOccSampler"; editorTemplate -l "Output" -ac "output"; editorTemplate -l "Coordinate System" -ac "coordSys"; editorTemplate -l "Use Face Tangents" -ac "faceTangents"; editorTemplate -endLayout; editorTemplate -beginLayout "Material Attributes" -collapse false; editorTemplate -l "Min Color" -ac "minColor"; editorTemplate -l "Max Color" -ac "maxColor"; editorTemplate -callCustom "AEilrOccSamplerNormalNew" "AEilrOccSamplerNormalReplace" "normalCamera"; editorTemplate -s "normalCamera"; editorTemplate -l "Environment" -ac "environment"; editorTemplate -endLayout; editorTemplate -beginLayout "Common Sampling Attributes" -collapse false; editorTemplate -l "Min Sample Rays" -ac "minSamples"; editorTemplate -l "Max Sample Rays" -ac "maxSamples"; editorTemplate -l "Cone Angle" -ac "coneAngle"; editorTemplate -addSeparator; editorTemplate -l "Max Distance" -ac "maxDistance"; editorTemplate -l "Contrast" -ac "contrast"; editorTemplate -l "Scale" -ac "scale"; editorTemplate -addSeparator; editorTemplate -beginNoOptimize; editorTemplate -l "Self Occlusion " -ac "selfOcclusion"; editorTemplate -l "Uniform Sampling" -ac "uniformSampling"; editorTemplate -l "Obey Transparency" -ac "useTransparency"; editorTemplate -l "Bend Normals" -ac "bendNormals" "AEilrUpdateOccSampler"; editorTemplate -endNoOptimize; editorTemplate -endLayout; editorTemplate -beginLayout "Adaptive Sampling Attributes" -collapse false; editorTemplate -l "Enable Adaptive Sampling" -ac "enableAdaptiveSampling" "AEilrUpdateOccSampler"; editorTemplate -l "Accuracy" -ac "accuracy"; editorTemplate -l "Smooth" -ac "smooth"; editorTemplate -l "Use Occlusion Map File" -ac "useFile" "AEilrUpdateOccSampler"; editorTemplate -l "File Name" -ac "file"; editorTemplate -endLayout; // include/call base class/node attributes AEdependNodeTemplate $node; // suppressed attributes editorTemplate -s "version"; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }