// =========================================================================== // 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 for adding dynamic attributes to maya nodes // global proc ilrRenderPassAttributes(int $add, string $node) { if (`nodeType $node` != "renderLayer") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrIllumination"`) { addAttr -ln "ilrIllumination" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrIndirectIllumination"`) { addAttr -ln "ilrIndirectIllumination" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrAlbedo"`) { addAttr -ln "ilrAlbedo" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrDiffuse"`) { addAttr -ln "ilrDiffuse" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrSpecular"`) { addAttr -ln "ilrSpecular" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrAmbient"`) { addAttr -ln "ilrAmbient" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrIncandescence"`) { addAttr -ln "ilrIncandescence" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrSss"`) { addAttr -ln "ilrSss" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrReflections"`) { addAttr -ln "ilrReflections" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrRefractions"`) { addAttr -ln "ilrRefractions" -at "bool" -dv false $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrIllumination"`) { deleteAttr -attribute "ilrIllumination" $node; } if (`attributeQuery -exists -node $node "ilrIndirectIllumination"`) { deleteAttr -attribute "ilrIndirectIllumination" $node; } if (`attributeQuery -exists -node $node "ilrAlbedo"`) { deleteAttr -attribute "ilrAlbedo" $node; } if (`attributeQuery -exists -node $node "ilrDiffuse"`) { deleteAttr -attribute "ilrDiffuse" $node; } if (`attributeQuery -exists -node $node "ilrSpecular"`) { deleteAttr -attribute "ilrSpecular" $node; } if (`attributeQuery -exists -node $node "ilrAmbient"`) { deleteAttr -attribute "ilrAmbient" $node; } if (`attributeQuery -exists -node $node "ilrIncandescence"`) { deleteAttr -attribute "ilrIncandescence" $node; } if (`attributeQuery -exists -node $node "ilrSss"`) { deleteAttr -attribute "ilrSss" $node; } if (`attributeQuery -exists -node $node "ilrReflections"`) { deleteAttr -attribute "ilrReflections" $node; } if (`attributeQuery -exists -node $node "ilrRefractions"`) { deleteAttr -attribute "ilrRefractions" $node; } } } global proc ilrIntensityAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if ($nodeType != "ambientLight" && $nodeType != "directionalLight" && $nodeType != "pointLight" && $nodeType != "spotLight" && $nodeType != "areaLight" && $nodeType != "volumeLight") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrEyeIntensity"`) { addAttr -ln "ilrEyeIntensity" -at "float" -dv 1.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (! `attributeQuery -exists -node $node "ilrReflIntensity"`) { addAttr -ln "ilrReflIntensity" -at "float" -dv 1.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (! `attributeQuery -exists -node $node "ilrRefrIntensity"`) { addAttr -ln "ilrRefrIntensity" -at "float" -dv 1.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (! `attributeQuery -exists -node $node "ilrIndirectIntensity"`) { addAttr -ln "ilrIndirectIntensity" -at "float" -dv 1.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (! `attributeQuery -exists -node $node "ilrIndirectLight"`) { addAttr -ln "ilrIndirectLight" -at "bool" -dv false $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrEyeIntensity"`) { deleteAttr -attribute "ilrEyeIntensity" $node; } if (`attributeQuery -exists -node $node "ilrReflIntensity"`) { deleteAttr -attribute "ilrReflIntensity" $node; } if (`attributeQuery -exists -node $node "ilrRefrIntensity"`) { deleteAttr -attribute "ilrRefrIntensity" $node; } if (`attributeQuery -exists -node $node "ilrIndirectIntensity"`) { deleteAttr -attribute "ilrIndirectIntensity" $node; } if (`attributeQuery -exists -node $node "ilrIndirectLight"`) { deleteAttr -attribute "ilrIndirectLight" $node; } } } global proc ilrDecayAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if ($nodeType != "pointLight" && $nodeType != "spotLight" && $nodeType != "ambientLight") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrRadiusOfInfluence"`) { addAttr -ln "ilrRadiusOfInfluence" -at "float" -dv 0.0 $node; } if (! `attributeQuery -exists -node $node "ilrCustomDecay"`) { addAttr -ln "ilrCustomDecay" -at "bool" -dv 0 $node; } if (! `attributeQuery -exists -node $node "ilrDistanceExp"`) { addAttr -ln "ilrDistanceExp" -at "float" -dv 1.0 $node; } if (! `attributeQuery -exists -node $node "ilrFalloffExp"`) { addAttr -ln "ilrFalloffExp" -at "float" -dv 1.0 $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrRadiusOfInfluence"`) { deleteAttr -attribute "ilrRadiusOfInfluence" $node; } if (`attributeQuery -exists -node $node "ilrCustomDecay"`) { deleteAttr -attribute "ilrCustomDecay" $node; } if (`attributeQuery -exists -node $node "ilrDistanceExp"`) { deleteAttr -attribute "ilrDistanceExp" $node; } if (`attributeQuery -exists -node $node "ilrFalloffExp"`) { deleteAttr -attribute "ilrFalloffExp" $node; } } } global proc ilrShadowAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if ($nodeType != "directionalLight" && $nodeType != "pointLight" && $nodeType != "spotLight" && $nodeType != "areaLight" && $nodeType != "volumeLight") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrDepthMapShadows"`) { addAttr -ln "ilrDepthMapShadows" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrDmapResolution"`) { addAttr -ln "ilrDmapResolution" -at "long" -dv 512 -hasMinValue true -minValue 16 -hasSoftMinValue true -softMinValue 16 -hasSoftMaxValue true -softMaxValue 2048 $node; } if (! `attributeQuery -exists -node $node "ilrDmapFilterSize"`) { addAttr -ln "ilrDmapFilterSize" -at "float" -dv 0.0 -hasMinValue true -minValue 0.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 10.0 $node; } if (! `attributeQuery -exists -node $node "ilrDmapSamples"`) { addAttr -ln "ilrDmapSamples" -at "long" -dv 1 -hasMinValue true -minValue 1 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 32 $node; } if (! `attributeQuery -exists -node $node "ilrDmapBias"`) { addAttr -ln "ilrDmapBias" -at "float" -dv 0.001 -hasMinValue true -minValue 0.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 1.0 $node; } if (! `attributeQuery -exists -node $node "ilrDmapUseMidDist"`) { addAttr -ln "ilrDmapUseMidDist" -at "bool" -dv true $node; } if (! `attributeQuery -exists -node $node "ilrDmapUseFile"`) { addAttr -ln "ilrDmapUseFile" -at "enum" -dv 0 -enumName "Off:Overwrite:Reuse:Reuse and append" $node; } if (! `attributeQuery -exists -node $node "ilrDmapFile"`) { addAttr -ln "ilrDmapFile" -dt "string" $node; } if (! `attributeQuery -exists -node $node "ilrRtraceMinShadowRays"`) { addAttr -ln "ilrRtraceMinShadowRays" -at "long" -dv 0 -hasMinValue true -minValue 0 $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrDepthMapShadows"`) { deleteAttr -attribute "ilrDepthMapShadows" $node; } if (`attributeQuery -exists -node $node "ilrDmapResolution"`) { deleteAttr -attribute "ilrDmapResolution" $node; } if (`attributeQuery -exists -node $node "ilrDmapFilterSize"`) { deleteAttr -attribute "ilrDmapFilterSize" $node; } if (`attributeQuery -exists -node $node "ilrDmapSamples"`) { deleteAttr -attribute "ilrDmapSamples" $node; } if (`attributeQuery -exists -node $node "ilrDmapBias"`) { deleteAttr -attribute "ilrDmapBias" $node; } if (`attributeQuery -exists -node $node "ilrDmapUseMidDist"`) { deleteAttr -attribute "ilrDmapUseMidDist" $node; } if (`attributeQuery -exists -node $node "ilrDmapUseFile"`) { deleteAttr -attribute "ilrDmapUseFile" $node; } if (`attributeQuery -exists -node $node "ilrDmapFile"`) { deleteAttr -attribute "ilrDmapFile" $node; } if (`attributeQuery -exists -node $node "ilrRtraceMinShadowRays"`) { deleteAttr -attribute "ilrRtraceMinShadowRays" $node; } } } global proc ilrLightGIAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if ($nodeType != "directionalLight" && $nodeType != "pointLight" && $nodeType != "spotLight" && $nodeType != "areaLight" && $nodeType != "volumeLight") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrEmit"`) { addAttr -ln "ilrEmit" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrPhotonEnergy"`) { addAttr -ln "ilrPhotonEnergy" -at "float" -dv 8000.0 -hasMinValue true -minValue 0.0 -hasMaxValue true -maxValue 1000000000.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 10000.0 $node; } if (! `attributeQuery -exists -node $node "ilrCausticsPhotons"`) { addAttr -ln "ilrCausticsPhotons" -at "long" -dv 10000 -hasMinValue true -minValue 0 -hasMaxValue true -maxValue 1000000000 -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 100000 $node; } if (! `attributeQuery -exists -node $node "ilrGlobalPhotons"`) { addAttr -ln "ilrGlobalPhotons" -at "long" -dv 10000 -hasMinValue true -minValue 0 -hasMaxValue true -maxValue 1000000000 -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 100000 $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrEmit"`) { deleteAttr -attribute "ilrEmit" $node; } if (`attributeQuery -exists -node $node "ilrPhotonEnergy"`) { deleteAttr -attribute "ilrPhotonEnergy" $node; } if (`attributeQuery -exists -node $node "ilrCausticsPhotons"`) { deleteAttr -attribute "ilrCausticsPhotons" $node; } if (`attributeQuery -exists -node $node "ilrGlobalPhotons"`) { deleteAttr -attribute "ilrGlobalPhotons" $node; } } } global proc ilrIESAttributes(int $add, string $node) { if (`nodeType $node` != "pointLight") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrLightProfileFileName"`) { addAttr -ln "ilrLightProfileFileName" -dt "string" $node; } if (! `attributeQuery -exists -node $node "ilrIESCounterClockwise"`) { addAttr -ln "ilrIESCounterClockwise" -at "bool" -dv false $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrLightProfileFileName"`) { deleteAttr -attribute "ilrLightProfileFileName" $node; } if (`attributeQuery -exists -node $node "ilrIESCounterClockwise"`) { deleteAttr -attribute "ilrIESCounterClockwise" $node; } } } global proc ilrShadingGroupAttributes(int $add, string $node) { if (`nodeType $node` != "shadingEngine") { return; } if ($add) { if (!`attributeQuery -exists -node $node "ilrPhotonShader"`) { addAttr -ln "ilrPhotonShader" -dt float3 $node; } if (!`attributeQuery -exists -node $node "ilrSurfaceShaderOverride"`) { addAttr -ln "ilrSurfaceShaderOverride" -dt float3 $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrPhotonShader"`) { deleteAttr -attribute "ilrPhotonShader" $node; } if (`attributeQuery -exists -node $node "ilrSurfaceShaderOverride"`) { deleteAttr -attribute "ilrSurfaceShaderOverride" $node; } } } global proc ilrTextureAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if ($nodeType != "file" && $nodeType != "psdFileTex") { return; } if ($add) { if (!`attributeQuery -exists -node $node "ilrZbrush"`) { addAttr -ln "ilrZbrush" -at bool $node; } if (!`attributeQuery -exists -node $node "ilrDisableGamma"`) { addAttr -ln "ilrDisableGamma" -at bool $node; } if (!`attributeQuery -exists -node $node "ilrLayerR"`) { addAttr -ln "ilrLayerR" -dt "string" $node; } if (!`attributeQuery -exists -node $node "ilrLayerG"`) { addAttr -ln "ilrLayerG" -dt "string" $node; } if (!`attributeQuery -exists -node $node "ilrLayerB"`) { addAttr -ln "ilrLayerB" -dt "string" $node; } if (!`attributeQuery -exists -node $node "ilrLayerA"`) { addAttr -ln "ilrLayerA" -dt "string" $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrZbrush"`) { deleteAttr -attribute "ilrZbrush" $node; } if (`attributeQuery -exists -node $node "ilrDisableGamma"`) { deleteAttr -attribute "ilrDisableGamma" $node; } if (`attributeQuery -exists -node $node "ilrLayerR"`) { deleteAttr -attribute "ilrLayerR" $node; } if (`attributeQuery -exists -node $node "ilrLayerG"`) { deleteAttr -attribute "ilrLayerG" $node; } if (`attributeQuery -exists -node $node "ilrLayerB"`) { deleteAttr -attribute "ilrLayerB" $node; } if (`attributeQuery -exists -node $node "ilrLayerA"`) { deleteAttr -attribute "ilrLayerA" $node; } } } global proc ilrMaterialGIAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if (!ilrIsMtrlShader($nodeType)) { return; } if ($add) { if (!`attributeQuery -exists -node $node "ilrGIPrimaryIntensity"`) { addAttr -ln "ilrGIPrimaryIntensity" -attributeType "float" -dv 1.0 -hasMinValue true -minValue 0.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (!`attributeQuery -exists -node $node "ilrGIPrimarySaturation"`) { addAttr -ln "ilrGIPrimarySaturation" -attributeType "float" -dv 1.0 -hasMinValue true -minValue 0.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (!`attributeQuery -exists -node $node "ilrGISecondaryIntensity"`) { addAttr -ln "ilrGISecondaryIntensity" -attributeType "float" -dv 1.0 -hasMinValue true -minValue 0.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (!`attributeQuery -exists -node $node "ilrGISecondarySaturation"`) { addAttr -ln "ilrGISecondarySaturation" -attributeType "float" -dv 1.0 -hasMinValue true -minValue 0.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (!`attributeQuery -exists -node $node "ilrGIDiffuseBoost"`) { addAttr -ln "ilrGIDiffuseBoost" -attributeType "float" -dv 1.0 -hasMinValue true -minValue 0.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (!`attributeQuery -exists -node $node "ilrGISpecularScale"`) { addAttr -ln "ilrGISpecularScale" -attributeType "float" -dv 1.0 -hasMinValue true -minValue 0.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (!`attributeQuery -exists -node $node "ilrGIEmissiveScale"`) { addAttr -ln "ilrGIEmissiveScale" -attributeType "float" -dv 1.0 -hasMinValue true -minValue 0.0 -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrGIPrimaryIntensity"`) { deleteAttr -attribute "ilrGIPrimaryIntensity" $node; } if (`attributeQuery -exists -node $node "ilrGIPrimarySaturation"`) { deleteAttr -attribute "ilrGIPrimarySaturation" $node; } if (`attributeQuery -exists -node $node "ilrGISecondaryIntensity"`) { deleteAttr -attribute "ilrGISecondaryIntensity" $node; } if (`attributeQuery -exists -node $node "ilrGISecondarySaturation"`) { deleteAttr -attribute "ilrGISecondarySaturation" $node; } if (`attributeQuery -exists -node $node "ilrGIDiffuseBoost"`) { deleteAttr -attribute "ilrGIDiffuseBoost" $node; } if (`attributeQuery -exists -node $node "ilrGISpecularScale"`) { deleteAttr -attribute "ilrGISpecularScale" $node; } if (`attributeQuery -exists -node $node "ilrGIEmissiveScale"`) { deleteAttr -attribute "ilrGIEmissiveScale" $node; } } } global proc ilrReflectionAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if (!ilrIsReflShader($nodeType)) { return; } if ($add) { if (!`attributeQuery -exists -node $node "ilrGlossyReflections"`) { addAttr -ln "ilrGlossyReflections" -at "bool" -dv false $node; } if (!`attributeQuery -exists -node $node "ilrGlossyMaximumRays"`) { addAttr -ln "ilrGlossyMaximumRays" -attributeType "long" -dv 9 -hasMinValue true -minValue 1 -hasMaxValue true -maxValue 10000 -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 100 $node; } if (!`attributeQuery -exists -node $node "ilrGlossySharpness"`) { addAttr -ln "ilrGlossySharpness" -attributeType "float" -dv 200 -hasMinValue true -minValue .01 -hasMaxValue true -maxValue 10000 -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 1000 $node; } if (!`attributeQuery -exists -node $node "ilrGlossyAnisotropic"`) { addAttr -ln "ilrGlossyAnisotropic" -at "bool" -dv ($nodeType == "anisotropic") $node; } if (!`attributeQuery -exists -node $node "ilrGlossyAngle"`) { addAttr -ln "ilrGlossyAngle" -attributeType "float" -dv 0 -hasMinValue true -minValue 0 -hasMaxValue true -maxValue 360 -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 360 $node; } if (!`attributeQuery -exists -node $node "ilrGlossySpreadX"`) { addAttr -ln "ilrGlossySpreadX" -attributeType "float" -dv 13 -hasMinValue true -minValue 0.1 -hasMaxValue true -maxValue 10000.0 -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 100.0 $node; } if (!`attributeQuery -exists -node $node "ilrGlossySpreadY"`) { addAttr -ln "ilrGlossySpreadY" -attributeType "float" -dv 3 -hasMinValue true -minValue 0.1 -hasMaxValue true -maxValue 10000.0 -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 100.0 $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrGlossyReflections"`) { deleteAttr -attribute "ilrGlossyReflections" $node; } if (`attributeQuery -exists -node $node "ilrGlossyMaximumRays"`) { deleteAttr -attribute "ilrGlossyMaximumRays" $node; } if (`attributeQuery -exists -node $node "ilrGlossySharpness"`) { deleteAttr -attribute "ilrGlossySharpness" $node; } if (`attributeQuery -exists -node $node "ilrGlossyAnisotropic"`) { deleteAttr -attribute "ilrGlossyAnisotropic" $node; } if (`attributeQuery -exists -node $node "ilrGlossyAngle"`) { deleteAttr -attribute "ilrGlossyAngle" $node; } if (`attributeQuery -exists -node $node "ilrGlossySpreadX"`) { deleteAttr -attribute "ilrGlossySpreadX" $node; } if (`attributeQuery -exists -node $node "ilrGlossySpreadY"`) { deleteAttr -attribute "ilrGlossySpreadY" $node; } } } global proc ilrRefractionAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if (!ilrIsRefrShader($nodeType)) { return; } if ($add) { if (!`attributeQuery -exists -node $node "ilrGlossyRefractions"`) { addAttr -ln "ilrGlossyRefractions" -at "bool" -dv false $node; } if (!`attributeQuery -exists -node $node "ilrGlossyRefrMaximumRays"`) { addAttr -ln "ilrGlossyRefrMaximumRays" -attributeType "long" -dv 4 -hasMinValue true -minValue 1 -hasMaxValue true -maxValue 1000 -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 100 $node; } if (!`attributeQuery -exists -node $node "ilrGlossyRefrSharpness"`) { addAttr -ln "ilrGlossyRefrSharpness" -attributeType "float" -dv 4 -hasMinValue true -minValue 0 -hasMaxValue true -maxValue 180 -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 180 $node; } if (!`attributeQuery -exists -node $node "ilrGlossyRefrAnisotropic"`) { addAttr -ln "ilrGlossyRefrAnisotropic" -at "bool" -dv ($nodeType == "anisotropic") $node; } if (!`attributeQuery -exists -node $node "ilrGlossyRefrAngle"`) { addAttr -ln "ilrGlossyRefrAngle" -attributeType "float" -dv 0 -hasMinValue true -minValue 0 -hasMaxValue true -maxValue 360 -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 360 $node; } if (!`attributeQuery -exists -node $node "ilrGlossyRefrSpreadX"`) { addAttr -ln "ilrGlossyRefrSpreadX" -attributeType "float" -dv 5 -hasMinValue true -minValue 0 -hasMaxValue true -maxValue 180.0 -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 180.0 $node; } if (!`attributeQuery -exists -node $node "ilrGlossyRefrSpreadY"`) { addAttr -ln "ilrGlossyRefrSpreadY" -attributeType "float" -dv 1 -hasMinValue true -minValue 0 -hasMaxValue true -maxValue 180 -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 180 $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrGlossyRefractions"`) { deleteAttr -attribute "ilrGlossyRefractions" $node; } if (`attributeQuery -exists -node $node "ilrGlossyRefrMaximumRays"`) { deleteAttr -attribute "ilrGlossyRefrMaximumRays" $node; } if (`attributeQuery -exists -node $node "ilrGlossyRefrSharpness"`) { deleteAttr -attribute "ilrGlossyRefrSharpness" $node; } if (`attributeQuery -exists -node $node "ilrGlossyRefrAnisotropic"`) { deleteAttr -attribute "ilrGlossyRefrAnisotropic" $node; } if (`attributeQuery -exists -node $node "ilrGlossyRefrAngle"`) { deleteAttr -attribute "ilrGlossyRefrAngle" $node; } if (`attributeQuery -exists -node $node "ilrGlossyRefrSpreadX"`) { deleteAttr -attribute "ilrGlossyRefrSpreadX" $node; } if (`attributeQuery -exists -node $node "ilrGlossyRefrSpreadY"`) { deleteAttr -attribute "ilrGlossyRefrSpreadY" $node; } } } global proc ilrCameraAttributes(int $add, string $node) { if (`nodeType $node` != "camera") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrEnvCamera"`) { addAttr -ln "ilrEnvCamera" -at "bool" $node; } if (! `attributeQuery -exists -node $node "ilrEnvCameraType"`) { addAttr -ln "ilrEnvCameraType" -at "enum" -enumName "Cube Map=0:Ball Map=1:Spherical Map (LatLong)=2" -dv 0 $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrEnvCamera"`) { deleteAttr -attribute "ilrEnvCamera" $node; } if (`attributeQuery -exists -node $node "ilrEnvCameraType"`) { deleteAttr -attribute "ilrEnvCameraType" $node; } } } global proc ilrDisplacementAttributes(int $add, string $node) { if (`nodeType $node` != "displacementShader") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrDisplacementMethod"`) { addAttr -ln "ilrDisplacementMethod" -at "enum" -dv 0 -enumName "Rendertime Micro Triangles=0:Pre-Tessellation=1" $node; } if (! `attributeQuery -exists -node $node "ilrDisplacementScale"`) { addAttr -ln "ilrDisplacementScale" -at "float" -dv 1.0 -hasMinValue false -hasMaxValue false -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 10.0 $node; } if (! `attributeQuery -exists -node $node "ilrSmoothBaseMesh"`) { addAttr -ln "ilrSmoothBaseMesh" -at "bool" -dv 0 $node; } if (! `attributeQuery -exists -node $node "ilrMTMaxTriangles"`) { addAttr -ln "ilrMTMaxTriangles" -at "long" -dv 100 -hasMinValue true -minValue 1 -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 200 $node; } if (! `attributeQuery -exists -node $node "ilrMTLod"`) { addAttr -ln "ilrMTLod" -at "bool" -dv 1 $node; } if (! `attributeQuery -exists -node $node "ilrMTLodMultiplier"`) { addAttr -ln "ilrMTLodMultiplier" -at "float" -dv 1.5 -hasMinValue false -hasMaxValue false -hasSoftMinValue true -softMinValue 1.0 -hasSoftMaxValue true -softMaxValue 10.0 $node; } if (! `attributeQuery -exists -node $node "ilrMTMaxRayOffset"`) { addAttr -ln "ilrMTMaxRayOffset" -at "float" -dv 0.0 -hasMinValue true -minValue 0.0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 3.0 $node; } if (! `attributeQuery -exists -node $node "ilrPTMaxSubdivs"`) { addAttr -ln "ilrPTMaxSubdivs" -at "long" -dv 3 -hasMinValue true -minValue 1 -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 20 $node; } if (! `attributeQuery -exists -node $node "ilrPTEdgeLength"`) { addAttr -ln "ilrPTEdgeLength" -at "float" -dv 0.010 -hasMinValue true -minValue 0.0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 10.0 $node; } if (! `attributeQuery -exists -node $node "ilrPTEdgeHeight"`) { addAttr -ln "ilrPTEdgeHeight" -at "float" -dv 0.001 -hasMinValue true -minValue 0.0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 1.0 $node; } if (! `attributeQuery -exists -node $node "ilrDispNormals"`) { addAttr -ln "ilrDispNormals" -at "bool" -dv false $node; } if (! `attributeQuery -exists -node $node "ilrDispNormalsThreshold"`) { addAttr -ln "ilrDispNormalsThreshold" -at "float" -dv 90.0 -hasMinValue true -minValue 0.0 -hasMaxValue true -maxValue 180.0 $node; } if (! `attributeQuery -exists -node $node "ilrAutoBounds"`) { addAttr -ln "ilrAutoBounds" -at "bool" -dv 1 $node; } if (! `attributeQuery -exists -node $node "ilrLowerBound"`) { addAttr -ln "ilrLowerBound" -at "float" -dv 0.0 -hasMinValue false -hasMaxValue false -hasSoftMinValue true -softMinValue -2.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } if (! `attributeQuery -exists -node $node "ilrUpperBound"`) { addAttr -ln "ilrUpperBound" -at "float" -dv 1.0 -hasMinValue false -hasMaxValue false -hasSoftMinValue true -softMinValue -2.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrDisplacementMethod"`) { deleteAttr -attribute "ilrDisplacementMethod" $node; } if (`attributeQuery -exists -node $node "ilrDisplacementScale"`) { deleteAttr -attribute "ilrDisplacementScale" $node; } if (`attributeQuery -exists -node $node "ilrSmoothBaseMesh"`) { deleteAttr -attribute "ilrSmoothBaseMesh" $node; } if (`attributeQuery -exists -node $node "ilrMTMaxTriangles"`) { deleteAttr -attribute "ilrMTMaxTriangles" $node; } if (`attributeQuery -exists -node $node "ilrMTLod"`) { deleteAttr -attribute "ilrMTLod" $node; } if (`attributeQuery -exists -node $node "ilrMTLodMultiplier"`) { deleteAttr -attribute "ilrMTLodMultiplier" $node; } if (`attributeQuery -exists -node $node "ilrMTMaxRayOffset"`) { deleteAttr -attribute "ilrMTMaxRayOffset" $node; } if (`attributeQuery -exists -node $node "ilrPTMaxSubdivs"`) { deleteAttr -attribute "ilrPTMaxSubdivs" $node; } if (`attributeQuery -exists -node $node "ilrPTEdgeLength"`) { deleteAttr -attribute "ilrPTEdgeLength" $node; } if (`attributeQuery -exists -node $node "ilrPTEdgeHeight"`) { deleteAttr -attribute "ilrPTEdgeHeight" $node; } if (`attributeQuery -exists -node $node "ilrDispNormals"`) { deleteAttr -attribute "ilrDispNormals" $node; } if (`attributeQuery -exists -node $node "ilrDispNormalsThreshold"`) { deleteAttr -attribute "ilrDispNormalsThreshold" $node; } if (`attributeQuery -exists -node $node "ilrAutoBounds"`) { deleteAttr -attribute "ilrAutoBounds" $node; } if (`attributeQuery -exists -node $node "ilrLowerBound"`) { deleteAttr -attribute "ilrLowerBound" $node; } if (`attributeQuery -exists -node $node "ilrUpperBound"`) { deleteAttr -attribute "ilrUpperBound" $node; } } } global proc ilrRenderStatsAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if ($nodeType != "mesh" && $nodeType != "nurbsSurface" && $nodeType != "subdiv") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrReceiveGI"`) { addAttr -ln "ilrReceiveGI" -at bool -dv 1 $node; setAttr -edit -keyable true ($node+".ilrReceiveGI"); } if (! `attributeQuery -exists -node $node "ilrCastGI"`) { addAttr -ln "ilrCastGI" -at bool -dv 1 $node; setAttr -edit -keyable true ($node+".ilrCastGI"); } if (! `attributeQuery -exists -node $node "ilrStaticGI"`) { addAttr -ln "ilrStaticGI" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrStaticGI"); } if (! `attributeQuery -exists -node $node "ilrSmoothGI"`) { addAttr -ln "ilrSmoothGI" -at bool -dv 1 $node; setAttr -edit -keyable true ($node+".ilrSmoothGI"); } if (! `attributeQuery -exists -node $node "ilrCastOcclusion"`) { addAttr -ln "ilrCastOcclusion" -at bool -dv 1 $node; setAttr -edit -keyable true ($node+".ilrCastOcclusion"); } if (! `attributeQuery -exists -node $node "ilrSelfOcclusion"`) { addAttr -ln "ilrSelfOcclusion" -at bool -dv 1 $node; setAttr -edit -keyable true ($node+".ilrSelfOcclusion"); } if (! `attributeQuery -exists -node $node "ilrReceiveOcclusion"`) { addAttr -ln "ilrReceiveOcclusion" -at bool -dv 1 $node; setAttr -edit -keyable true ($node+".ilrReceiveOcclusion"); } if (! `attributeQuery -exists -node $node "ilrVisibleInFG"`) { addAttr -ln "ilrVisibleInFG" -at bool -dv 1 $node; setAttr -edit -keyable true ($node+".ilrVisibleInFG"); } if (! `attributeQuery -exists -node $node "ilrShadowBias"`) { addAttr -ln "ilrShadowBias" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrShadowBias"); } if (! `attributeQuery -exists -node $node "ilrSmoothNormals"`) { addAttr -ln "ilrSmoothNormals" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrSmoothNormals"); } if (! `attributeQuery -exists -node $node "ilrNormalThreshold"`) { addAttr -ln "ilrNormalThreshold" -at "float" -dv 30.0 -hasMinValue true -minValue 0.0 -hasMaxValue true -maxValue 180.0 $node; setAttr -edit -keyable true ($node+".ilrNormalThreshold"); } } else // remove { if (`attributeQuery -exists -node $node "ilrSmoothNormals"`) { deleteAttr -attribute "ilrSmoothNormals" $node; } if (`attributeQuery -exists -node $node "ilrNormalThreshold"`) { deleteAttr -attribute "ilrNormalThreshold" $node; } if (`attributeQuery -exists -node $node "ilrVisibleInFG"`) { deleteAttr -attribute "ilrVisibleInFG" $node; } if (`attributeQuery -exists -node $node "ilrCastGI"`) { deleteAttr -attribute "ilrCastGI" $node; } if (`attributeQuery -exists -node $node "ilrReceiveGI"`) { deleteAttr -attribute "ilrReceiveGI" $node; } if (`attributeQuery -exists -node $node "ilrStaticGI"`) { deleteAttr -attribute "ilrStaticGI" $node; } if (`attributeQuery -exists -node $node "ilrSmoothGI"`) { deleteAttr -attribute "ilrSmoothGI" $node; } if (`attributeQuery -exists -node $node "ilrCastOcclusion"`) { deleteAttr -attribute "ilrCastOcclusion" $node; } if (`attributeQuery -exists -node $node "ilrReceiveOcclusion"`) { deleteAttr -attribute "ilrReceiveOcclusion" $node; } if (`attributeQuery -exists -node $node "ilrShadowBias"`) { deleteAttr -attribute "ilrShadowBias" $node; } if (`attributeQuery -exists -node $node "ilrSelfOcclusion"`) { deleteAttr -attribute "ilrSelfOcclusion" $node; } } } global proc ilrGeometryGIAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if ($nodeType != "mesh" && $nodeType != "nurbsSurface" && $nodeType != "subdiv") { return; } if ($add) { // // Caustics overrides // if (! `attributeQuery -exists -node $node "ilrCausticsOverride"`) { addAttr -ln "ilrCausticsOverride" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrCausticsOverride"); } if (! `attributeQuery -exists -node $node "ilrCausticsAccuracy"`) { addAttr -ln "ilrCausticsAccuracy" -at "float" -dv 1.0 -hasMinValue true -minValue 0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; setAttr -edit -keyable true ($node+".ilrCausticsAccuracy"); } if (! `attributeQuery -exists -node $node "ilrCausticsRadius"`) { addAttr -ln "ilrCausticsRadius" -at "float" -dv 0.0 $node; setAttr -edit -keyable true ($node+".ilrCausticsRadius"); } // // Global photon map overrides // if (! `attributeQuery -exists -node $node "ilrGlobalPhotonMapOverride"`) { addAttr -ln "ilrGlobalPhotonMapOverride" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrGlobalPhotonMapOverride"); } if (! `attributeQuery -exists -node $node "ilrGlobalPhotonMapAccuracy"`) { addAttr -ln "ilrGlobalPhotonMapAccuracy" -at "float" -dv 1.0 -hasMinValue true -minValue 0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0.0 -hasSoftMaxValue true -softMaxValue 2.0 $node; setAttr -edit -keyable true ($node+".ilrGlobalPhotonMapAccuracy"); } if (! `attributeQuery -exists -node $node "ilrGlobalPhotonMapRadius"`) { addAttr -ln "ilrGlobalPhotonMapRadius" -at "float" -dv 0.0 $node; setAttr -edit -keyable true ($node+".ilrGlobalPhotonMapRadius"); } // // Final gather overrides // if (! `attributeQuery -exists -node $node "ilrFinalGatherOverride"`) { addAttr -ln "ilrFinalGatherOverride" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrFinalGatherOverride"); } if (! `attributeQuery -exists -node $node "ilrFinalGatherRays"`) { addAttr -ln "ilrFinalGatherRays" -at "long" -dv 1000 -hasMinValue true -minValue 10 -hasMaxValue false -hasSoftMinValue true -softMinValue 10 -hasSoftMaxValue true -softMaxValue 10000 $node; setAttr -edit -keyable true ($node+".ilrFinalGatherRays"); } if (! `attributeQuery -exists -node $node "ilrFinalGatherInterpolationPoints"`) { addAttr -ln "ilrFinalGatherInterpolationPoints" -at "long" -dv 15 -hasMinValue true -minValue 1 -hasMaxValue false -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 30 $node; setAttr -edit -keyable true ($node+".ilrFinalGatherInterpolationPoints"); } if (! `attributeQuery -exists -node $node "ilrFinalGatherEstimatePoints"`) { addAttr -ln "ilrFinalGatherEstimatePoints" -at "long" -dv 15 -hasMinValue true -minValue 1 -hasMaxValue false -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 30 $node; setAttr -edit -keyable true ($node+".ilrFinalGatherEstimatePoints"); } if (! `attributeQuery -exists -node $node "ilrFinalGatherContrastThreshold"`) { addAttr -ln "ilrFinalGatherContrastThreshold" -at "float" -dv 0.10 -hasMinValue true -minValue 0.010 -hasMaxValue true -maxValue 1.0 $node; setAttr -edit -keyable true ($node+".ilrFinalGatherContrastThreshold"); } if (! `attributeQuery -exists -node $node "ilrFinalGatherAccuracy"`) { addAttr -ln "ilrFinalGatherAccuracy" -at "float" -dv 1.0 -hasMinValue true -minValue 0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 2.0 $node; setAttr -edit -keyable true ($node+".ilrFinalGatherAccuracy"); } if (! `attributeQuery -exists -node $node "ilrFinalGatherSmooth"`) { addAttr -ln "ilrFinalGatherSmooth" -at "float" -dv 1.0 -hasMinValue true -minValue 0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 2.0 $node; setAttr -edit -keyable true ($node+".ilrFinalGatherSmooth"); } // // Path tracer overrides // if (! `attributeQuery -exists -node $node "ilrPathTracerOverride"`) { addAttr -ln "ilrPathTracerOverride" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrPathTracerOverride"); } if (! `attributeQuery -exists -node $node "ilrPathTracerFilterType"`) { addAttr -ln "ilrPathTracerFilterType" -at "enum" -dv 1 -enumName "None:Box:Triangle:Gauss" $node; setAttr -edit -keyable true ($node+".ilrPathTracerFilterType"); } if (! `attributeQuery -exists -node $node "ilrPathTracerFilterSize"`) { addAttr -ln "ilrPathTracerFilterSize" -at "float" -dv 3.0 -hasMinValue true -minValue 0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 10.0 $node; setAttr -edit -keyable true ($node+".ilrPathTracerFilterSize"); } // // Monte Carlo overrides // if (! `attributeQuery -exists -node $node "ilrMonteCarloOverride"`) { addAttr -ln "ilrMonteCarloOverride" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrMonteCarloOverride"); } if (! `attributeQuery -exists -node $node "ilrMonteCarloRays"`) { addAttr -ln "ilrMonteCarloRays" -at "long" -dv 16 -hasMinValue true -minValue 1 -hasMaxValue false -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 1000 $node; setAttr -edit -keyable true ($node+".ilrMonteCarloRays"); } } else // remove { if (`attributeQuery -exists -node $node "ilrCausticsOverride"`) { deleteAttr -attribute "ilrCausticsOverride" $node; } if (`attributeQuery -exists -node $node "ilrCausticsAccuracy"`) { deleteAttr -attribute "ilrCausticsAccuracy" $node; } if (`attributeQuery -exists -node $node "ilrCausticsRadius"`) { deleteAttr -attribute "ilrCausticsRadius" $node; } if (`attributeQuery -exists -node $node "ilrGlobalPhotonMapOverride"`) { deleteAttr -attribute "ilrGlobalPhotonMapOverride" $node; } if (`attributeQuery -exists -node $node "ilrGlobalPhotonMapAccuracy"`) { deleteAttr -attribute "ilrGlobalPhotonMapAccuracy" $node; } if (`attributeQuery -exists -node $node "ilrGlobalPhotonMapRadius"`) { deleteAttr -attribute "ilrGlobalPhotonMapRadius" $node; } if (`attributeQuery -exists -node $node "ilrFinalGatherOverride"`) { deleteAttr -attribute "ilrFinalGatherOverride" $node; } if (`attributeQuery -exists -node $node "ilrFinalGatherRays"`) { deleteAttr -attribute "ilrFinalGatherRays" $node; } if (`attributeQuery -exists -node $node "ilrFinalGatherInterpolationPoints"`) { deleteAttr -attribute "ilrFinalGatherInterpolationPoints" $node; } if (`attributeQuery -exists -node $node "ilrFinalGatherEstimatePoints"`) { deleteAttr -attribute "ilrFinalGatherEstimatePoints" $node; } if (`attributeQuery -exists -node $node "ilrFinalGatherContrastThreshold"`) { deleteAttr -attribute "ilrFinalGatherContrastThreshold" $node; } if (`attributeQuery -exists -node $node "ilrFinalGatherAccuracy"`) { deleteAttr -attribute "ilrFinalGatherAccuracy" $node; } if (`attributeQuery -exists -node $node "ilrFinalGatherSmooth"`) { deleteAttr -attribute "ilrFinalGatherSmooth" $node; } if (`attributeQuery -exists -node $node "ilrPathTracerOverride"`) { deleteAttr -attribute "ilrPathTracerOverride" $node; } if (`attributeQuery -exists -node $node "ilrPathTracerFilterType"`) { deleteAttr -attribute "ilrPathTracerFilterType" $node; } if (`attributeQuery -exists -node $node "ilrPathTracerFilterSize"`) { deleteAttr -attribute "ilrPathTracerFilterSize" $node; } if (`attributeQuery -exists -node $node "ilrMonteCarloOverride"`) { deleteAttr -attribute "ilrMonteCarloOverride" $node; } if (`attributeQuery -exists -node $node "ilrMonteCarloRays"`) { deleteAttr -attribute "ilrMonteCarloRays" $node; } } } global proc ilrBakeAttributes(int $add, string $node) { string $nodeType = `nodeType $node`; if ($nodeType != "mesh" && $nodeType != "nurbsSurface" && $nodeType != "subdiv") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrBakeResOverride"`) { addAttr -ln "ilrBakeResOverride" -at bool -dv 0 $node; } if (! `attributeQuery -exists -node $node "ilrBakeResX"`) { addAttr -ln "ilrBakeResX" -at "long" -dv 512 -hasMinValue true -minValue 0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 4096 $node; } if (! `attributeQuery -exists -node $node "ilrBakeResY"`) { addAttr -ln "ilrBakeResY" -at "long" -dv 512 -hasMinValue true -minValue 0 -hasMaxValue false -hasSoftMinValue true -softMinValue 0 -hasSoftMaxValue true -softMaxValue 4096 $node; } if (! `attributeQuery -exists -node $node "ilrBakeScale"`) { addAttr -ln "ilrBakeScale" -at "float" -dv 1.0 -hasMinValue true -minValue 0.01 -hasMaxValue false $node; } } else // remove { if (`attributeQuery -exists -node $node "ilrBakeResOverride"`) { deleteAttr -attribute "ilrBakeResOverride" $node; } if (`attributeQuery -exists -node $node "ilrBakeResX"`) { deleteAttr -attribute "ilrBakeResX" $node; } if (`attributeQuery -exists -node $node "ilrBakeResY"`) { deleteAttr -attribute "ilrBakeResY" $node; } if (`attributeQuery -exists -node $node "ilrBakeScale"`) { deleteAttr -attribute "ilrBakeScale" $node; } } } global proc ilrSubdivAttributes(int $add, string $node) { if (`nodeType $node` != "mesh") { return; } if ($add) { if (! `attributeQuery -exists -node $node "ilrSubdivEnable"`) { addAttr -ln "ilrSubdivEnable" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrSubdivEnable"); } if (! `attributeQuery -exists -node $node "ilrSubdivDepth"`) { addAttr -ln "ilrSubdivDepth" -at "long" -dv 2 -hasMinValue true -minValue 1 -hasMaxValue false -hasSoftMinValue true -softMinValue 1 -hasSoftMaxValue true -softMaxValue 5 $node; setAttr -edit -keyable true ($node+".ilrSubdivDepth"); } if (! `attributeQuery -exists -node $node "ilrSubdivCorner"`) { addAttr -ln "ilrSubdivCorner" -at bool -dv 0 $node; setAttr -edit -keyable true ($node+".ilrSubdivCorner"); } if (! `attributeQuery -exists -node $node "ilrSmoothUV"`) { addAttr -ln "ilrSmoothUV" -at bool -dv 1 $node; setAttr -edit -keyable true ($node+".ilrSmoothUV"); } } else // remove { if (`attributeQuery -exists -node $node "ilrSubdivEnable"`) { deleteAttr -attribute "ilrSubdivEnable" $node; } if (`attributeQuery -exists -node $node "ilrSubdivDepth"`) { deleteAttr -attribute "ilrSubdivDepth" $node; } if (`attributeQuery -exists -node $node "ilrSubdivCorner"`) { deleteAttr -attribute "ilrSubdivCorner" $node; } if (`attributeQuery -exists -node $node "ilrSmoothUV"`) { deleteAttr -attribute "ilrSmoothUV" $node; } } }