// =========================================================================== // 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: July, 1998 // // Description: // This script contains code to create and/or set the default // values for the option vars for the Dynamics Clip Effects // menus/option boxes. // // // ================ dynSetClipEffectsOptionVars ================ // // SYNOPSIS // Set the specified sprite clip effect option box controls. // // INPUT ARGUMENTS // string $theClipEffect the name of the clip effect to set controls for // int $setFactorySettings whether to use default settings. // // global proc dynSetClipEffectsOptionVars(string $theClipEffect, int $setFactorySettings) { if (!isValidClipEffect($theClipEffect)) return; string $procName = ("set"+$theClipEffect+"OptionVars"); eval ($procName+" "+$setFactorySettings); } // ================ setSmokeOptionVars ================ // // SYNOPSIS // Set the smoke sprite clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // global proc setSmokeOptionVars (int $setFactorySettings) { // Option vars for the image attributes. // if( $setFactorySettings || !`optionVar -exists smokeImageName` ) { optionVar -stringValue smokeImageName ""; } if( $setFactorySettings || !`optionVar -exists smokeCycleImages` ) { optionVar -intValue smokeCycleImages 0 ; } if( $setFactorySettings || !`optionVar -exists smokeStartImage` ) { optionVar -intValue smokeStartImage 0; } if( $setFactorySettings || !`optionVar -exists smokeEndImage` ) { optionVar -intValue smokeEndImage 50; } // Option vars for the smoke attributes. // if( $setFactorySettings || !`optionVar -exists smokeParticleName` ) { optionVar -stringValue smokeParticleName ""; } if( $setFactorySettings || !`optionVar -exists smokeMinLifespan` ) { optionVar -floatValue smokeMinLifespan 3.0; } if( $setFactorySettings || !`optionVar -exists smokeMaxLifespan` ) { optionVar -floatValue smokeMaxLifespan 7.0; } if( $setFactorySettings || !`optionVar -exists smokeThreshold` ) { optionVar -floatValue smokeThreshold 0.25; } if( $setFactorySettings || !`optionVar -exists smokeOpacity` ) { optionVar -floatValue smokeOpacity .4; } // Option vars for the smoke emission attributes. // if( $setFactorySettings || !`optionVar -exists smokeEmitterName` ) { optionVar -stringValue smokeEmitterName ""; } if( $setFactorySettings || !`optionVar -exists smokeEmissionRate` ) { optionVar -floatValue smokeEmissionRate 112.4; } if( $setFactorySettings || !`optionVar -exists smokeEmissionSpread` ) { optionVar -floatValue smokeEmissionSpread .11; } if( $setFactorySettings || !`optionVar -exists smokeEmissionSpeed` ) { optionVar -floatValue smokeEmissionSpeed 1.0; } if( $setFactorySettings || !`optionVar -exists smokeEmissionDirX` ) { optionVar -floatValue smokeEmissionDirX 0.0; } if( $setFactorySettings || !`optionVar -exists smokeEmissionDirY` ) { optionVar -floatValue smokeEmissionDirY 1.0; } if( $setFactorySettings || !`optionVar -exists smokeEmissionDirZ` ) { optionVar -floatValue smokeEmissionDirZ 0.0; } // Option vars for the turbulence attributes. // if( $setFactorySettings || !`optionVar -exists smokeUseTurbulence` ) { optionVar -intValue smokeUseTurbulence 1 ; } if( $setFactorySettings || !`optionVar -exists smokeTurbulenceName` ) { optionVar -stringValue smokeTurbulenceName ""; } if( $setFactorySettings || !`optionVar -exists smokeTurbulenceMagnitude` ) { optionVar -floatValue smokeTurbulenceMagnitude 0.2; } if( $setFactorySettings || !`optionVar -exists smokeTurbulenceFrequency` ) { optionVar -floatValue smokeTurbulenceFrequency 2.0; } if( $setFactorySettings || !`optionVar -exists smokeTurbulenceAttenuation` ) { optionVar -floatValue smokeTurbulenceAttenuation 2.8; } } // ================ setFireOptionVars ================ // // SYNOPSIS // Set the fire clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // global proc setFireOptionVars (int $setFactorySettings) { // Option vars for the fire object and particle names. // if( $setFactorySettings || !`optionVar -exists fireObject` ) { optionVar -stringValue fireObject ""; } if( $setFactorySettings || !`optionVar -exists fireParticleName` ) { optionVar -stringValue fireParticleName ""; } // Option var for the emitter type. // if( $setFactorySettings || !`optionVar -exists fireEmissionTypeOV`) { optionVar -intValue fireEmissionTypeOV 3; } // Option vars for the fire attributes. // if( $setFactorySettings || !`optionVar -exists fireDensity` ) { optionVar -floatValue fireDensity 10; } if( $setFactorySettings || !`optionVar -exists fireStartRadius` ) { optionVar -floatValue fireStartRadius 1.0; } if( $setFactorySettings || !`optionVar -exists fireEndRadius` ) { optionVar -floatValue fireEndRadius 0.4; } if( $setFactorySettings || !`optionVar -exists fireIntensity` ) { optionVar -floatValue fireIntensity .35; } if( $setFactorySettings || !`optionVar -exists fireSpread` ) { optionVar -floatValue fireSpread .15; } if( $setFactorySettings || !`optionVar -exists fireScale` ) { optionVar -floatValue fireScale 1; } if( $setFactorySettings || !`optionVar -exists fireTurbulence` ) { optionVar -floatValue fireTurbulence 240; } if( $setFactorySettings || !`optionVar -exists fireSpeed` ) { optionVar -floatValue fireSpeed 85; } // Option vars for the fire direction. // if( $setFactorySettings || !`optionVar -exists fireDirectionX` ) { optionVar -floatValue fireDirectionX 0.0; } if( $setFactorySettings || !`optionVar -exists fireDirectionY` ) { optionVar -floatValue fireDirectionY 1.0; } if( $setFactorySettings || !`optionVar -exists fireDirectionZ` ) { optionVar -floatValue fireDirectionZ 0.0; } } // ================ setFireworksOptionVars ================ // // SYNOPSIS // Set the fireworks clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // global proc setFireworksOptionVars (int $setFactorySettings) { // Option var for the fireworks name. // if( $setFactorySettings || !`optionVar -exists fireworksName` ) { optionVar -stringValue fireworksName ""; } if( $setFactorySettings || !`optionVar -exists fwNumRockets` ) { optionVar -intValue fwNumRockets 10; } if( $setFactorySettings || !`optionVar -exists fwLaunchPositionX` ) { optionVar -floatValue fwLaunchPositionX 0; } if( $setFactorySettings || !`optionVar -exists fwLaunchPositionY` ) { optionVar -floatValue fwLaunchPositionY 0; } if( $setFactorySettings || !`optionVar -exists fwLaunchPositionZ` ) { optionVar -floatValue fwLaunchPositionZ 0; } if( $setFactorySettings || !`optionVar -exists fwBurstPosCenterX` ) { optionVar -floatValue fwBurstPosCenterX 0; } if( $setFactorySettings || !`optionVar -exists fwBurstPosCenterY` ) { optionVar -floatValue fwBurstPosCenterY 25; } if( $setFactorySettings || !`optionVar -exists fwBurstPosCenterZ` ) { optionVar -floatValue fwBurstPosCenterZ 0; } if( $setFactorySettings || !`optionVar -exists fwBurstExtentsX` ) { optionVar -floatValue fwBurstExtentsX 10; } if( $setFactorySettings || !`optionVar -exists fwBurstExtentsY` ) { optionVar -floatValue fwBurstExtentsY 10; } if( $setFactorySettings || !`optionVar -exists fwBurstExtentsZ` ) { optionVar -floatValue fwBurstExtentsZ 10; } if( $setFactorySettings || !`optionVar -exists fwFirstLaunchFrame` ) { optionVar -floatValue fwFirstLaunchFrame 1; } if( $setFactorySettings || !`optionVar -exists fwLaunchRate` ) { optionVar -floatValue fwLaunchRate .1; } if( $setFactorySettings || !`optionVar -exists fwMinFlightTime` ) { optionVar -floatValue fwMinFlightTime 30; } if( $setFactorySettings || !`optionVar -exists fwMaxFlightTime` ) { optionVar -floatValue fwMaxFlightTime 60; } if( $setFactorySettings || !`optionVar -exists fwMaxBurstSpeed` ) { optionVar -floatValue fwMaxBurstSpeed 20; } if( $setFactorySettings || !`optionVar -exists fwTrailRate` ) { optionVar -floatValue fwTrailRate 50; } if( $setFactorySettings || !`optionVar -exists fwTrailSpeed` ) { optionVar -floatValue fwTrailSpeed 0.5; } if( $setFactorySettings || !`optionVar -exists fwTrailSpread` ) { optionVar -floatValue fwTrailSpread 0.5; } if( $setFactorySettings || !`optionVar -exists fwMinTrailTailSize` ) { optionVar -floatValue fwMinTrailTailSize .2; } if( $setFactorySettings || !`optionVar -exists fwMaxTrailTailSize` ) { optionVar -floatValue fwMaxTrailTailSize .8; } if( $setFactorySettings || !`optionVar -exists fwTrailSetUserColor` ) { optionVar -intValue fwTrailSetUserColor 0; } if( $setFactorySettings || !`optionVar -exists fwTrailColorCreationProc` ) { optionVar -stringValue fwTrailColorCreationProc ""; } if( $setFactorySettings || !`optionVar -exists fwTrailNumColors` ) { optionVar -intValue fwTrailNumColors 5; } if( $setFactorySettings || !`optionVar -exists fwTrailGlowIntensity` ) { optionVar -floatValue fwTrailGlowIntensity .3; } if( $setFactorySettings || !`optionVar -exists fwTrailIncanIntensity` ) { optionVar -floatValue fwTrailIncanIntensity .25; } if( $setFactorySettings || !`optionVar -exists fwMinSparksCount` ) { optionVar -floatValue fwMinSparksCount 100; } if( $setFactorySettings || !`optionVar -exists fwMaxSparksCount` ) { optionVar -floatValue fwMaxSparksCount 200; } if( $setFactorySettings || !`optionVar -exists fwMinSparksTailSize` ) { optionVar -floatValue fwMinSparksTailSize .3; } if( $setFactorySettings || !`optionVar -exists fwMaxSparksTailSize` ) { optionVar -floatValue fwMaxSparksTailSize 1; } if( $setFactorySettings || !`optionVar -exists fwSparksSetUserColor` ) { optionVar -intValue fwSparksSetUserColor 0; } if( $setFactorySettings || !`optionVar -exists fwSparksColorCreationProc` ) { optionVar -stringValue fwSparksColorCreationProc ""; } if( $setFactorySettings || !`optionVar -exists fwSparksNumColors` ) { optionVar -intValue fwSparksNumColors 32; } if( $setFactorySettings || !`optionVar -exists fwSparksColorSpread` ) { optionVar -intValue fwSparksColorSpread 1; } if( $setFactorySettings || !`optionVar -exists fwSparksGlowIntensity` ) { optionVar -floatValue fwSparksGlowIntensity .3; } if( $setFactorySettings || !`optionVar -exists fwSparksIncanIntensity` ) { optionVar -floatValue fwSparksIncanIntensity .25; } } // ================ setFlowOptionVars ================ // // SYNOPSIS // Set the flow-along-curve clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // global proc setFlowOptionVars (int $setFactorySettings) { // Option var for the melt object. // if( $setFactorySettings || !`optionVar -exists flowObject` ) { optionVar -stringValue flowObject ""; } // Option vars for the flow creation controls. // if( $setFactorySettings || !`optionVar -exists flowAttachEmitter` ) { optionVar -intValue flowAttachEmitter 1 ; } if( $setFactorySettings || !`optionVar -exists flowNumControlSegs` ) { optionVar -floatValue flowNumControlSegs 5; } if( $setFactorySettings || !`optionVar -exists flowNumControlSubsegs` ) { optionVar -floatValue flowNumControlSubsegs 4; } // Option vars for the flow attributes. // if( $setFactorySettings || !`optionVar -exists flowEmitterRate` ) { optionVar -floatValue flowEmitterRate 50; } if( $setFactorySettings || !`optionVar -exists flowRandomMotion` ) { optionVar -floatValue flowRandomMotion .5; } if( $setFactorySettings || !`optionVar -exists flowLifespan` ) { optionVar -floatValue flowLifespan 5; } if( $setFactorySettings || !`optionVar -exists flowGoalWeight` ) { optionVar -floatValue flowGoalWeight 1; } } // ================ setSurfaceFlowOptionVars ================ // // SYNOPSIS // Set the flow-along-surface clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // global proc setSurfaceFlowOptionVars(int $setFactorySettings) { // Remove old unused string prefs // if( `optionVar -exists surfaceFlowManipType` ) { optionVar -rm surfaceFlowManipType; } // Option var for the surface flow object. // if( $setFactorySettings || !`optionVar -exists surfaceFlowObject` ) { optionVar -stringValue surfaceFlowObject ""; } // Option vars for the flow creation controls. // if( $setFactorySettings || !`optionVar -exists surfaceFlowCreateParticle` ) { optionVar -intValue surfaceFlowCreateParticle 1 ; } if( $setFactorySettings || !`optionVar -exists surfaceFlowCreateParticleForEachFlow` ) { optionVar -intValue surfaceFlowCreateParticleForEachFlow 0 ; } if( $setFactorySettings || !`optionVar -exists surfaceFlowManipTypeId` ) { // 1 == "u", 2 == "v", 3 == "-u", 4 == "-v" optionVar -intValue surfaceFlowManipTypeId 1; } if( $setFactorySettings || !`optionVar -exists surfaceFlowControlResolution` ) { optionVar -floatValue surfaceFlowControlResolution 5; } if( $setFactorySettings || !`optionVar -exists surfaceFlowSubControlResolution` ) { optionVar -floatValue surfaceFlowSubControlResolution 0; } if( $setFactorySettings || !`optionVar -exists surfaceFlowManipulatorResolution` ) { optionVar -floatValue surfaceFlowManipulatorResolution 2; } // Option vars for the flow attributes. // if( $setFactorySettings || !`optionVar -exists surfaceFlowGoalWeight` ) { optionVar -floatValue surfaceFlowGoalWeight 1; } if( $setFactorySettings || !`optionVar -exists surfaceFlowEmitterRate` ) { optionVar -floatValue surfaceFlowEmitterRate 10; } if($setFactorySettings || !`optionVar -exists surfaceFlowParticleLifespan`) { optionVar -floatValue surfaceFlowParticleLifespan 1.0; } if( $setFactorySettings || !`optionVar -exists surfaceFlowMinAgeRatio` ) { optionVar -floatValue surfaceFlowMinAgeRatio 0; } if( $setFactorySettings || !`optionVar -exists surfaceFlowMaxAgeRatio` ) { optionVar -floatValue surfaceFlowMaxAgeRatio 1; } } // ================ setDeleteSurfaceFlowOptionVars ================ // // SYNOPSIS // Set the delete-surface-flow clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // global proc setDeleteSurfaceFlowOptionVars(int $setFactorySettings) { if( $setFactorySettings || !`optionVar -exists deleteSurfaceFlow` ) { optionVar -intValue deleteSurfaceFlow 1 ; } if( $setFactorySettings || !`optionVar -exists removeParticlesFromSurfaceFlow` ) { optionVar -intValue removeParticlesFromSurfaceFlow 0 ; } if( $setFactorySettings || !`optionVar -exists deleteSurfaceFlowParticles`) { optionVar -intValue deleteSurfaceFlowParticles 0 ; } int $checkBoxExist = `checkBoxGrp -exists deleteSurfaceFlowParticles`; if( $checkBoxExist ) { int $removeParticles = 0; int $radioExist = `optionVar -exists removeParticlesFromSurfaceFlow`; if( $radioExist ) $removeParticles = `optionVar -q removeParticlesFromSurfaceFlow`; if( $removeParticles ) checkBoxGrp -e -enable 0 deleteSurfaceFlowParticles; else checkBoxGrp -e -enable 1 deleteSurfaceFlowParticles; } } // ================ setLightningOptionVars ================ // // SYNOPSIS // Set the lightning clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // global proc setLightningOptionVars(int $setFactorySettings) { // Option var for the surface flow object. // if( $setFactorySettings || !`optionVar -exists lightningObject` ) { optionVar -stringValue lightningObject ""; } // Option vars for the flow creation controls. // if( $setFactorySettings || !`optionVar -exists lightningGrouping` ) { optionVar -intValue lightningGrouping 0 ; } if( $setFactorySettings || !`optionVar -exists lightningCreateOptions` ) { optionVar -intValue lightningCreateOptions 1 ; } if( $setFactorySettings || !`optionVar -exists lightningCurveSegments` ) { optionVar -intValue lightningCurveSegments 20; } if( $setFactorySettings || !`optionVar -exists lightningThickness` ) { optionVar -floatValue lightningThickness 1; } if( $setFactorySettings || !`optionVar -exists lightningMaxSpread` ) { optionVar -floatValue lightningMaxSpread 1; } if( $setFactorySettings || !`optionVar -exists lightningStart` ) { optionVar -floatValue lightningStart 0; } if( $setFactorySettings || !`optionVar -exists lightningEnd` ) { optionVar -floatValue lightningEnd 1; } if( $setFactorySettings || !`optionVar -exists lightningGlowIntensity` ) { optionVar -floatValue lightningGlowIntensity 0.5; } } // ================ setMeltOptionVars ================ // // SYNOPSIS // Set the melt clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // global proc setMeltOptionVars (int $setFactorySettings) { // Option vars for the melt object and melt-on object names. // if( $setFactorySettings || !`optionVar -exists meltObject` ) { optionVar -stringValue meltObject ""; } if( $setFactorySettings || !`optionVar -exists meltOnObject` ) { optionVar -stringValue meltOnObject ""; } // Option vars for the melt attributes. // if( $setFactorySettings || !`optionVar -exists meltSpeed` ) { optionVar -floatValue meltSpeed .4; } if( $setFactorySettings || !`optionVar -exists meltSpread` ) { optionVar -floatValue meltSpread 1.0; } if( $setFactorySettings || !`optionVar -exists meltDistortion` ) { optionVar -floatValue meltDistortion 1.5; } // Option vars for the melt direction. // if( $setFactorySettings || !`optionVar -exists meltDirectionX` ) { optionVar -floatValue meltDirectionX 0.0; } if( $setFactorySettings || !`optionVar -exists meltDirectionY` ) { optionVar -floatValue meltDirectionY -1.0; } if( $setFactorySettings || !`optionVar -exists meltDirectionZ` ) { optionVar -floatValue meltDirectionZ 0.0; } // Option vars for the melt control resolution. // if( $setFactorySettings || !`optionVar -exists meltUseLatticeRes` ) { optionVar -intValue meltUseLatticeRes 0 ; } if( $setFactorySettings || !`optionVar -exists meltLatticeResX` ) { optionVar -intValue meltLatticeResX 0; } if( $setFactorySettings || !`optionVar -exists meltLatticeResY` ) { optionVar -intValue meltLatticeResY 0; } if( $setFactorySettings || !`optionVar -exists meltLatticeResZ` ) { optionVar -intValue meltLatticeResZ 0; } } // ================ setShatterOptionVars ================ // // SYNOPSIS // Set the shatter clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // OPTION VARIABLES // // Variable | Type | Values | Default | Notes // ----------------+-----------+-----------------------+-----------+-------- // shatter type : string | surface/solid/crack : surface : // global proc setShatterOptionVars (int $setFactorySettings) { if ( $setFactorySettings ) { string $shatterTypeValue = `optionVar -query shatterType`; if ( $shatterTypeValue == "shatterSurfaceTab" ) { setSurfaceShatterOptionVars( $setFactorySettings ); } else if ( $shatterTypeValue == "shatterSolidTab" ) { setSolidShatterOptionVars( $setFactorySettings ); } else if ( $shatterTypeValue == "shatterCrackTab" ) { setCrackShatterOptionVars( $setFactorySettings ); } } else { if ( !`optionVar -exists shatterType` ) { optionVar -stringValue shatterType "shatterSurfaceTab"; } setSurfaceShatterOptionVars( $setFactorySettings ); setSolidShatterOptionVars ( $setFactorySettings ); setCrackShatterOptionVars ( $setFactorySettings ); } } // ================ setSurfaceShatterOptionVars ================ // // SYNOPSIS // Set the shatter clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // OPTION VARIABLES // // Variable | Type | Values | Default | Notes // ----------------+-----------+-----------------------+-----------+-------- // shatter name : string | any string : surfaceShatter : // shard count : integer | > 1 : 5 : // smoothing : integer | on/off : on : // extrude : integer | on/off : off : // triangulate : integer | on/off : on : // post operation : string | sets/soft/rigid : sets : // edge Perturb : float | >= 0.0 : 0.0 : // exact shards : integer | on/off : on : // seed : integer | 0 - 100 : 0 : // verbose : integer | on/off : off : // global proc setSurfaceShatterOptionVars (int $setFactorySettings) { // Remove unsed string prefs // if( `optionVar -exists shatterSurfacePostOperation` ) { optionVar -rm shatterSurfacePostOperation; } if( $setFactorySettings || !`optionVar -exists shatterSurfaceName` ) { optionVar -stringValue shatterSurfaceName "surfaceShatter"; } if( $setFactorySettings || !`optionVar -exists shatterSurfaceShardCount` ) { optionVar -intValue shatterSurfaceShardCount 5; } if( $setFactorySettings || !`optionVar -exists shatterSurfaceTriangulate` ) { optionVar -intValue shatterSurfaceTriangulate true; } if( $setFactorySettings || !`optionVar -exists shatterSurfaceSmoothing` ) { optionVar -intValue shatterSurfaceSmoothing true; } if( $setFactorySettings || !`optionVar -exists shatterSurfaceExtrude` ) { optionVar -floatValue shatterSurfaceExtrude 0.0; } if( $setFactorySettings || !`optionVar -exists shatterSurfacePostOp` ) { // 1 = shapes, 2 = rigid bodies with collisions off // 3 = soft bodies with goals, 4 = soft bodies with lattice and goals // 5 = sets optionVar -intValue shatterSurfacePostOp 1; } // if( $setFactorySettings || !`optionVar -exists shatterSurfaceEdgePerturbation` ) // { // optionVar -floatValue shatterSurfaceEdgePerturbation 0.0; // } if( $setFactorySettings || !`optionVar -exists shatterSurfaceExactCount` ) { optionVar -intValue shatterSurfaceExactCount true; } if( $setFactorySettings || !`optionVar -exists shatterSurfaceVerbose` ) { optionVar -intValue shatterSurfaceVerbose false; } if( $setFactorySettings || !`optionVar -exists shatterSurfaceOriginal` ) { optionVar -intValue shatterSurfaceOriginal 1; } if( $setFactorySettings || !`optionVar -exists shatterSurfaceMakeRigidBody` ) { optionVar -intValue shatterSurfaceMakeRigidBody 1; } if( $setFactorySettings || !`optionVar -exists shatterSurfaceSeedValue` ) { optionVar -intValue shatterSurfaceSeedValue 0; } } // ================ setSolidShatterOptionVars ================ // // SYNOPSIS // Set the shatter clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // OPTION VARIABLES // // Variable | Type | Values | Default | Notes // ----------------+-----------+-----------------------+-----------+-------- // shatter name : string | any string : solidShatter : // shard count : integer | > 1 : 5 : // triangulate : integer | on/off : on : // post operation : string | shapes/sets/soft/rigid: sets : // edge Perturb : float | >= 0.0 : 0.0 : // seed : integer | 0 - 100 : 0 : // verbose : integer | on/off : off : // global proc setSolidShatterOptionVars (int $setFactorySettings) { // Remove unused string prefs if( `optionVar -exists shatterSolidPostOperation` ) { optionVar -rm shatterSolidPostOperation; } if( $setFactorySettings || !`optionVar -exists shatterSolidName` ) { optionVar -stringValue shatterSolidName "solidShatter"; } if( $setFactorySettings || !`optionVar -exists shatterSolidShardCount` ) { optionVar -intValue shatterSolidShardCount 5; } if( $setFactorySettings || !`optionVar -exists shatterSolidTriangulate` ) { optionVar -intValue shatterSolidTriangulate true; } if( $setFactorySettings || !`optionVar -exists shatterSolidInteriorMaterial` ) { optionVar -intValue shatterSolidInteriorMaterial true; } if( $setFactorySettings || !`optionVar -exists shatterSolidRemoveInterior` ) { optionVar -intValue shatterSolidRemoveInterior false; } if( $setFactorySettings || !`optionVar -exists shatterSolidExtrude` ) { optionVar -floatValue shatterSolidExtrude 0.0; } if( $setFactorySettings || !`optionVar -exists shatterSolidPostOp` ) { // 1 = "shapes", 2 = "rigid bodies with collisions off" // 3 = "soft bodies with goals". 4 = "soft bodies with lattice and goals" optionVar -intValue shatterSolidPostOp 1; } if( $setFactorySettings || !`optionVar -exists shatterSolidEdgePerturbation` ) { optionVar -floatValue shatterSolidEdgePerturbation 0.0; } if( $setFactorySettings || !`optionVar -exists shatterSolidVerbose` ) { optionVar -intValue shatterSolidVerbose false; } if( $setFactorySettings || !`optionVar -exists shatterSolidOriginal` ) { optionVar -intValue shatterSolidOriginal 1; } if( $setFactorySettings || !`optionVar -exists shatterSolidMakeRigidBody` ) { optionVar -intValue shatterSolidMakeRigidBody 1; } if( $setFactorySettings || !`optionVar -exists shatterSolidSeedValue` ) { optionVar -intValue shatterSolidSeedValue 0; } } // ================ setCrackShatterOptionVars ================ // // SYNOPSIS // Set the shatter clip effect option box optionVars. // // INPUT ARGUMENTS // int $setFactorySettings whether to use default settings. // // OPTION VARIABLES // // Variable | Type | Values | Default | Notes // ----------------+-----------+-----------------------+-----------+-------- // shatter name : string | any string : crackShatter : // crack count : integer | > 0 : 5 : // crack length : integer | > 0 : 50 : // triangulate : integer | on/off : on : // post operation : string | shapes/sets/soft/rigid: sets : // edge Perturb : float | >= 0.0 : 0.0 : // seed : integer | 0 - 100 : 0 : // verbose : integer | on/off : off : // global proc setCrackShatterOptionVars (int $setFactorySettings) { // Remove unused string option vars if( `optionVar -exists shatterCrackPostOperation` ) { optionVar -rm shatterCrackPostOperation; } if( $setFactorySettings || !`optionVar -exists shatterCrackName` ) { optionVar -stringValue shatterCrackName "crackShatter"; } if( $setFactorySettings || !`optionVar -exists shatterCrackCount` ) { optionVar -intValue shatterCrackCount 5; } if( $setFactorySettings || !`optionVar -exists shatterCrackLength` ) { optionVar -intValue shatterCrackLength 200; } if( $setFactorySettings || !`optionVar -exists shatterCrackTriangulate` ) { optionVar -intValue shatterCrackTriangulate true; } if( $setFactorySettings || !`optionVar -exists shatterCrackExtrude` ) { optionVar -floatValue shatterCrackExtrude 0.0; } if( $setFactorySettings || !`optionVar -exists shatterCrackPostOp` ) { // 1 = "cracks on surface", 2 = "shapes" // 3 = "rigid bodies with collisions off" 4 = "soft bodies with goals" // 5 = "soft bodies with lattice and goals", 6 = "sets" optionVar -intValue shatterCrackPostOp 2; } if( $setFactorySettings || !`optionVar -exists shatterCrackEdgePerturbation` ) { optionVar -floatValue shatterCrackEdgePerturbation 0.0; } if( $setFactorySettings || !`optionVar -exists shatterCrackVerbose` ) { optionVar -intValue shatterCrackVerbose false; } if( $setFactorySettings || !`optionVar -exists shatterCrackOriginal` ) { optionVar -intValue shatterCrackOriginal 1; } if( $setFactorySettings || !`optionVar -exists shatterCrackMakeRigidBody` ) { optionVar -intValue shatterCrackMakeRigidBody 1; } if( $setFactorySettings || !`optionVar -exists shatterCrackSeedValue` ) { optionVar -intValue shatterCrackSeedValue 0; } }