// =========================================================================== // 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. // =========================================================================== // The routines in this file are provided so old presets still function // correctly for newly added attributes. proc setFluidOldPresetDefaults( string $n ) { setAttr ($n+".autoResize") false; setAttr ($n+".squareVoxels") false; setAttr ($n+".lightBrightness") 1.0; setAttr ($n+".ambientBrightness") 0.0; setAttr ($n+".lightColor") 1.0 1.0 1.0; setAttr ($n+".substeps") 1; setAttr ($n+".forwardAdvection") 0; setAttr ($n+".lightType") 1; setAttr ($n+".shadowDiffusion") 0; setAttr ($n+".velocityNoise") 0.0; } // Old presets may not contain newly added attributes. When applying such // presets we want these attributes to be first set to a default that // preserves old behavior, so the preset still functions correctly. If // the preset does contain the new attribute then it will still set it, // as this routine is called before the preset values are set. global proc setNodeDefaultsForOldPresets( string $node ) { string $type = nodeType( $node ); if( $type == "fluidShape" ){ setFluidOldPresetDefaults( $node ); } }