// =========================================================================== // 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 the layouts for the // dynamics clip effects option boxes (for the Dynamics Effects menus). // // ====================== dynCreateClipEffectsLayout ====================== // // SYNOPSIS // Create a clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // string $theClipEffect the name of the clip effect to make the layout // for // global proc dynCreateClipEffectsLayout(string $parent, string $theClipEffect) { if (!isValidClipEffect($theClipEffect)) return; string $procName = ("create"+$theClipEffect+"Layout"); eval(($procName +" "+$parent)); } // ====================== createSmokeLayout ====================== // // SYNOPSIS // Create a sprite smoke clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc createSmokeLayout( string $parent ) { global float $gDynMaxFloatField; global float $gDynMinFloatField; setParent $parent; // Sprite Image Name Widget // textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSpriteImageName")) -annotation (uiRes("m_dynCreateClipEffectsLayout.kSpriteImageNameAnnot")) smokeImageName; // Smoke Effect Attributes layout // separator smokeSep1; text -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeEffectAttributes")) -al "left" smokeAttrsT; // Smoke Particle Name Widget // textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeParticleName")) smokeParticleName; checkBoxGrp -label (uiRes("m_dynCreateClipEffectsLayout.kCycleImages")) -ncb 1 -label1 "" smokeCycleImages; intFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kStartImage")) -nf 1 smokeStartImage; intFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kEndImage")) -nf 1 smokeEndImage; // Smoke Attributes Controls // floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeSpriteMinLifespan")) -field true -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 smokeMinLifespan; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeSpriteMaxLifespan")) -field true -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 smokeMaxLifespan; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeThreshold")) -field true -min 0 -max 1 -pre 3 -step 0.1 smokeThreshold; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeOpacity")) -field true -min 0 -max 1 -pre 3 -step 0.5 smokeOpacity; // Smoke Emission Attributes Controls // separator smokeSep2; text -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeEmissionAttributes")) -al "left" smokeEmissionAttrsT; // Smoke Emitter Name Widget // textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeEmitterName")) smokeEmitterName; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeEmissionRate")) -field true -min 0 -max 500 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 10 smokeEmissionRate; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kDirectionX")) -field true -min -10 -max 10 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 0.5 smokeEmissionDirX; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kDirectionY")) -field true -min -10 -max 10 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 0.5 smokeEmissionDirY; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kDirectionZ")) -field true -min -10 -max 10 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 0.5 smokeEmissionDirZ; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeEmissionSpread")) -field true -min 0 -max 1 -pre 3 -step 0.1 smokeEmissionSpread; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeEmissionSpeed")) -field true -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 0.1 smokeEmissionSpeed; // Smoke Motion Attributes Controls. // separator smokeSep3; text -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeMotionAttributes")) -al "left" smokeMotionAttrsT; checkBoxGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMotionForces")) -ncb 1 -label1 (uiRes("m_dynCreateClipEffectsLayout.kTurbulence")) -on1 "dynEnableTurbulenceCB 1" -of1 "dynEnableTurbulenceCB 0" smokeMotionForces; // Turbulence Attribute Controls. // text -label (uiRes("m_dynCreateClipEffectsLayout.kTurbulenceAttributes")) -al "left" smokeTurbAttrsT; // Smoke Turbulence Name Widget // textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSmokeTurbulenceName")) smokeTurbulenceName; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kTurbulenceMagnitude")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 0.5 smokeTurbulenceMagnitude; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kTurbulenceFrequency")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 0.5 smokeTurbulenceFrequency; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kTurbulenceAttenuation")) -field true -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 0.1 smokeTurbulenceAttenuation; setParent ..; setParent ..; } // ====================== createFireLayout ====================== // // SYNOPSIS // Create a fire clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc createFireLayout( string $parent ) { global float $gDynMaxFloatField; global float $gDynMinFloatField; setParent $parent; // Fire Effect Attributes layout // separator fireSep1; string $fireAttributes = (uiRes("m_dynCreateClipEffectsLayout.kFireAttributes")); text -label $fireAttributes -al "left" fireEffectAttrsT; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kObjectOnFire")) fireObject; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireParticleName")) fireParticleName; separator fireSep2; text -label $fireAttributes -al "left" fireAttrsT; // Emitter Types Option Menu // optionMenuGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireEmitterType")) -cc ("dynClipEffectsEmitterOptionChoice " + $parent) fireEmissionTypeOM; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kOmnidirectionalPoint")) emitterOmniPoint; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kDirectionalPoint")) emitterDirPoint; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kSurface")) emitterSurface; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kCurve")) emitterCurve; // Fire Attributes Controls // floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireDensity")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 10 fireDensity; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFlameStartRadius")) -field true -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step .1 fireStartRadius; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFlameEndRadius")) -field true -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step .1 fireEndRadius; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireIntensity")) -field true -min 0 -max 1 -pre 3 -step .1 fireIntensity; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireSpread")) -field true -min 0 -max 1 -pre 3 -step 0.1 fireSpread; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireSpeed")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 0.5 fireSpeed; // Fire direction controls. // floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireDirectionX")) -field true -min -10 -max 10 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 0.5 fireDirectionX; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireDirectionY")) -field true -min -10 -max 10 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 0.5 fireDirectionY; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireDirectionZ")) -field true -min -10 -max 10 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 0.5 fireDirectionZ; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireTurbulence")) -field true -min 0 -max 500 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 0.5 fireTurbulence; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireScale")) -field true -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 0.1 fireScale; setParent ..; setParent ..; } // ====================== createFlowLayout ====================== // // SYNOPSIS // Create a flow-along-curves clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc createFlowLayout( string $parent ) { global float $gDynMaxFloatField; global float $gDynMinFloatField; setParent $parent; // Flow Along Curves Effect Attributes layout // separator flowSep1; text -label (uiRes("m_dynCreateClipEffectsLayout.kFlowAlongCurves")) -al "left" flowEffectAttrsT; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFlowGroupName")) flowObject; separator flowSep2; text -label (uiRes("m_dynCreateClipEffectsLayout.kFlowCreationControls")) -al "left" flowCreateControlT; // Flow Creation Controls // checkBoxGrp -label (uiRes("m_dynCreateClipEffectsLayout.kAttachEmitterToCurve")) -ncb 1 -label1 "" flowAttachEmitter; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kNumControlSegments")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -sliderStep 1 flowNumControlSegs; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kNumControlSubsegments")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -sliderStep 1 flowNumControlSubsegs; separator flowSep3; text -label (uiRes("m_dynCreateClipEffectsLayout.kFlowAttributeControls")) -al "left" flowAttrsT; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kEmissionRate")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 flowEmitterRate; // Flow random motion factor // floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kRandomMotionSpeed")) -field true -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 flowRandomMotion; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kParticleLifespan")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 0.1 flowLifespan; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kGoalWeight")) -field true -min 0 -max 1 -pre 3 -step 0.1 flowGoalWeight; setParent ..; setParent ..; } // ====================== createSurfaceFlowLayout ====================== // // SYNOPSIS // Create a flow-along-surface clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc createSurfaceFlowLayout( string $parent ) { global float $gDynMaxFloatField; global float $gDynMinFloatField; setParent $parent; // Flow Along Curves Effect Attributes layout // separator surfaceFlowSep1; text -label (uiRes("m_dynCreateClipEffectsLayout.kFlowAlongSurface")) -al "left" surfaceFlowEffectAttrsT; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSurfaceFlowGroupName")) surfaceFlowObject; separator surfaceFlowSep2; text -label (uiRes("m_dynCreateClipEffectsLayout.kSurfaceFlowCreation")) -al "left" surfaceFlowCreateControlT; // Flow Creation Controls // checkBoxGrp -label (uiRes("m_dynCreateClipEffectsLayout.kCreateParticle")) -ncb 1 -label1 "" surfaceFlowCreateParticle; checkBoxGrp -label (uiRes("m_dynCreateClipEffectsLayout.kCreateParticlePerFlow")) -ncb 1 -label1 "" surfaceFlowCreateParticleForEachFlow; optionMenuGrp -label (uiRes("m_dynCreateClipEffectsLayout.kManipulatorsAlong")) -enable true surfaceFlowManipType; string $u = (uiRes("m_dynCreateClipEffectsLayout.kU")); string $v = (uiRes("m_dynCreateClipEffectsLayout.kV")); string $minU = (uiRes("m_dynCreateClipEffectsLayout.kMinusU")); string $minV = (uiRes("m_dynCreateClipEffectsLayout.kMinusV")); menuItem -label $u surfaceFlowManipTypeU; menuItem -label $minU surfaceFlowManipTypeU2; menuItem -label $v surfaceFlowManipTypeV; menuItem -label $minV surfaceFlowManipTypeV2; // setParent -m ..; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kControlResolution")) -field true -min 2 -max 100 -fmn 0 -fmx $gDynMaxFloatField -sliderStep 1 surfaceFlowControlResolution; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSubControlResolution")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -sliderStep 1 surfaceFlowSubControlResolution; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kManipulatorResolution")) -field true -min 3 -max 20 -fmn 0 -fmx $gDynMaxFloatField -sliderStep 1 surfaceFlowManipulatorResolution; separator surfaceFlowSep3; text -label (uiRes("m_dynCreateClipEffectsLayout.kSurfaceFlowControls")) -al "left" surfaceFlowAttrsT; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSurfaceEmissionRate")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 surfaceFlowEmitterRate; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSurfaceParticleLifespan")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 surfaceFlowParticleLifespan; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSurfaceGoalWeight")) -field true -min 0 -max 1 -pre 3 -step 0.1 surfaceFlowGoalWeight; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMinAgeRatio")) -field true -min 0 -max 1 -pre 3 -step 0.1 surfaceFlowMinAgeRatio; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMaxAgeRatio")) -field true -min 0 -max 1 -pre 3 -step 0.1 surfaceFlowMaxAgeRatio; setParent ..; setParent ..; } // ====================== createDeleteSurfaceFlowLayout ====================== // // SYNOPSIS // Create a delete-surface-flow effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc createDeleteSurfaceFlowLayout( string $parent ) { setParent $parent; separator deleteSurfaceFlowSep1; text -label (uiRes("m_dynCreateClipEffectsLayout.kFlowDeletionControls")) -al "left" surfaceFlowDeleteControlT; // Deletion Controls // radioButtonGrp -label "" -nrb 1 -cal 1 "left" -label1 (uiRes("m_dynCreateClipEffectsLayout.kDeleteSurfaceFlowGroups")) -cc1 ("deleteSurfaceFlowParticlesCB 1") deleteSurfaceFlow; radioButtonGrp -label "" -nrb 1 -cal 1 "left" -shareCollection deleteSurfaceFlow -label1 (uiRes("m_dynCreateClipEffectsLayout.kRemoveParticlesFromSurface")) -cc1 ("deleteSurfaceFlowParticlesCB 0") removeParticlesFromSurfaceFlow; checkBoxGrp -label "" -ncb 1 -cal 1 "left" -label1 (uiRes("m_dynCreateClipEffectsLayout.kDeleteSurfaceFlowParticles")) deleteSurfaceFlowParticles; setParent ..; setParent ..; } // ====================== createLightningLayout ====================== // // SYNOPSIS // Create a lightning clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc createLightningLayout( string $parent ) { global float $gDynMaxFloatField; global float $gDynMinFloatField; setParent $parent; // Flow Along Curves Effect Attributes layout // separator lightningFlowSep1; text -label (uiRes("m_dynCreateClipEffectsLayout.kLightning")) -al "left" lightningEffectAttrsT; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kLightningName")) lightningObject; separator lightningFlowSep2; text -label (uiRes("m_dynCreateClipEffectsLayout.kLightningCreationControls")) -al "left" lightningCreateControlT; // Lightning Creation Controls // checkBoxGrp -label (uiRes("m_dynCreateClipEffectsLayout.kGroupLightnings")) -ncb 1 -label1 "" lightningGrouping; radioButtonGrp -label (uiRes("m_dynCreateClipEffectsLayout.kCreationOptions")) -nrb 3 -cal 1 "left" -label1 (uiRes("m_dynCreateClipEffectsLayout.kAll")) -label2 (uiRes("m_dynCreateClipEffectsLayout.kInOrder")) -label3 (uiRes("m_dynCreateClipEffectsLayout.kFromFirst")) lightningCreateOptions; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kCurveSegments")) -field true -min 5 -max 100 -fmn 5 -fmx $gDynMaxFloatField -sliderStep 1 lightningCurveSegments; separator lightningFlowSep3; text -label (uiRes("m_dynCreateClipEffectsLayout.kLightningAttributeControls")) -al "left" lightningAttrsT; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kThickness")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 lightningThickness; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMaxSpread")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 lightningMaxSpread; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kLightningStart")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 lightningStart; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kLightningEnd")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 lightningEnd; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kLightningGlowIntensity")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 lightningGlowIntensity; setParent ..; setParent ..; } global proc deleteSurfaceFlowParticlesCB( int $enable ) { checkBoxGrp -e -enable $enable deleteSurfaceFlowParticles; } // =================== INTERNAL CONTROL CALLBACKS =============== // // // Callback for the smoke Use turbulence checkbox. // global proc dynEnableTurbulenceCB(int $isTurbulenceOn) { if ($isTurbulenceOn) { textFieldGrp -e -enable true smokeTurbulenceName; floatSliderGrp -e -enable true smokeTurbulenceMagnitude; floatSliderGrp -e -enable true smokeTurbulenceFrequency; floatSliderGrp -e -enable true smokeTurbulenceAttenuation; } else { textFieldGrp -e -enable false smokeTurbulenceName; floatSliderGrp -e -enable false smokeTurbulenceMagnitude; floatSliderGrp -e -enable false smokeTurbulenceFrequency; floatSliderGrp -e -enable false smokeTurbulenceAttenuation; } } // Callback for the fire emitter option menu. // Set fire spread "on" for all but the omni emitter type. // global proc dynClipEffectsEmitterOptionChoice(string $parent) { setParent $parent; int $choice = `optionMenuGrp -q -sl fireEmissionTypeOM`; if ($choice == 1 || $choice == 3) { // Omni Point and Surface // floatSliderGrp -e -enable false fireSpread; } else { // Directional Point and Curve // floatSliderGrp -e -enable true fireSpread; } } // Callback for the melt Use resolution control. // global proc dynEnableLatticeResCB(string $parent, int $isOn) { setParent $parent; if ($isOn) { floatSliderGrp -e -enable true meltLatticeResX; floatSliderGrp -e -enable true meltLatticeResY; floatSliderGrp -e -enable true meltLatticeResZ; } else { floatSliderGrp -e -enable false meltLatticeResX; floatSliderGrp -e -enable false meltLatticeResY; floatSliderGrp -e -enable false meltLatticeResZ; } } // ====================== createMeltLayout ====================== // // SYNOPSIS // Create a melt clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc createMeltLayout( string $parent ) { global float $gDynMaxFloatField; global float $gDynMinFloatField; setParent $parent; // Melt Effect Attributes layout // string $meltAttributes = (uiRes("m_dynCreateClipEffectsLayout.kMeltAttributes")); separator meltSep1; text -label $meltAttributes -al "left" meltEffectAttrsT; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kObjectToMelt")) meltObject; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMeltonObject")) meltOnObject; separator meltSep2; text -label $meltAttributes -al "left" meltAttrsT; // Melt Attributes Controls // floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMeltSpeed")) -field true -min 0 -max 10 -fmn 0 -fmx 1000 -pre 3 -step .5 meltSpeed; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMeltSpread")) -field true -min 0 -max 10 -fmn 0 -fmx 1000 -pre 3 -step 1 meltSpread; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMeltDistortion")) -field true -min 0 -max 10 -fmn 0 -fmx 1000 -pre 3 -step 1 meltDistortion; // Melt direction controls. // floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMeltDirectionX")) -field true -min -1 -max 1 -pre 3 -step 0.1 meltDirectionX; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMeltDirectionY")) -field true -min -1 -max 1 -pre 3 -step 0.1 meltDirectionY; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMeltDirectionZ")) -field true -min -1 -max 1 -pre 3 -step 0.1 meltDirectionZ; // Melt control resolution. // checkBoxGrp -label (uiRes("m_dynCreateClipEffectsLayout.kUseResolutionControl")) -ncb 1 -label1 "" -on1 ("dynEnableLatticeResCB " + $parent + " 1") -of1 ("dynEnableLatticeResCB " + $parent + " 0") meltUseLatticeRes; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kControlResolutionX")) -field true -min 2 -max 100 -pre 0 -step 1 meltLatticeResX; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kControlResolutionY")) -field true -min 2 -max 100 -pre 0 -step 1 meltLatticeResY; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kControlResolutionZ")) -field true -min 2 -max 100 -pre 0 -step 1 meltLatticeResZ; setParent ..; setParent ..; } // ====================== createFireworksLayout ====================== // // SYNOPSIS // Create a fireworks clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc createFireworksLayout( string $parent ) { global float $gDynMaxFloatField; global float $gDynMinFloatField; setParent $parent; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFireworksName")) fireworksName; // Rocket Attributes layout // frameLayout -label (uiRes("m_dynCreateClipEffectsLayout.kRocketAttributes")) -bv true -lv true -cll true -cl false -mh 4 fwRocketAttrsF; columnLayout fwRocketAttrsC; // Controls for fireworks rockets // intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kNumRockets")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -sliderStep 1 fwNumRockets; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kLaunchPositionX")) -field true -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwLaunchPositionX; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kLaunchPositionY")) -field true -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwLaunchPositionY; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kLaunchPositionZ")) -field true -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwLaunchPositionZ; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kBurstPositionCenterX")) -field true -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwBurstPosCenterX; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kBurstPositionCenterY")) -field true -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwBurstPosCenterY; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kBurstPositionCenterZ")) -field true -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwBurstPosCenterZ; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kBurstPositionExtentsX")) -field true -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwBurstExtentsX; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kBurstPositionExtentsY")) -field true -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwBurstExtentsY; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kBurstPositionExtentsZ")) -field true -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwBurstExtentsZ; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kFirstLaunchFrame")) -field true -min 0 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwFirstLaunchFrame; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kLaunchRatePerFrame")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 fwLaunchRate; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMinFlightTimeFrames")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 fwMinFlightTime; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMaxFlightTimeFrames")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 1 fwMaxFlightTime; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMaxBurstSpeed")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 10 fwMaxBurstSpeed; setParent ..; setParent ..; // Rocket Trail Sparks Attributes layout // frameLayout -label (uiRes("m_dynCreateClipEffectsLayout.kRocketTrailAttributes")) -bv true -lv true -cll true -cl true -mh 4 fwRocketTrailAttrsF; columnLayout fwRocketTrailAttrsC; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSparksEmissionRate")) -field true -min 0 -max 500 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 10 fwTrailRate; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kEmissionSpeed")) -field true -min 0 -max 100 -pre 3 -step 1 fwTrailSpeed; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kEmissionSpread")) -field true -min 0 -max 1 -pre 3 -step .1 fwTrailSpread; string $minTailSize = (uiRes("m_dynCreateClipEffectsLayout.kMinTailSize")); floatSliderGrp -label $minTailSize -field true -min 0 -max 10 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwMinTrailTailSize; string $maxTailSize = (uiRes("m_dynCreateClipEffectsLayout.kMaxTailSize")); floatSliderGrp -label $maxTailSize -field true -min 0 -max 10 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwMaxTrailTailSize; // Rocket Trail Colors layout // separator; text -label (uiRes("m_dynCreateClipEffectsLayout.kRocketTrailColorAttributes")) -al "left" fwRockeTrailColorsAttrsT; string $setColorProc = (uiRes("m_dynCreateClipEffectsLayout.kSetColorCreationProc")); checkBoxGrp -label $setColorProc -ncb 1 -v1 0 -label1 "" -on1 ("fwTrailSetUserColorProcCB " + $parent + " 1") -of1 ("fwTrailSetUserColorProcCB " + $parent + " 0") fwTrailSetUserColor; string $colorProc = (uiRes("m_dynCreateClipEffectsLayout.kColorCreationProc")); textFieldGrp -label $colorProc fwTrailColorCreationProc; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kNumTrailColors")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -sliderStep 1 fwTrailNumColors; string $glowIntensity = (uiRes("m_dynCreateClipEffectsLayout.kGlowIntensity")); floatSliderGrp -label $glowIntensity -field true -min 0 -max 1 -pre 3 -step .1 fwTrailGlowIntensity; string $incandescenceIntensity = (uiRes("m_dynCreateClipEffectsLayout.kIncandescenceIntensity")); floatSliderGrp -label $incandescenceIntensity -field true -min 0 -max 1 -pre 3 -step .1 fwTrailIncanIntensity; setParent ..; setParent ..; // Rocket Burst Sparks layout // frameLayout -label (uiRes("m_dynCreateClipEffectsLayout.kFireworksSparksAttributes")) -bv true -lv true -cll true -cl true -mh 4 fwBurstAttrsF; columnLayout fwBurstAttrsC; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMinSparksCount")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 10 fwMinSparksCount; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kMaxSparksCount")) -field true -min 0 -max 500 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 10 fwMaxSparksCount; floatSliderGrp -label $minTailSize -field true -min 0 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwMinSparksTailSize; floatSliderGrp -label $maxTailSize -field true -min 0 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 1 fwMaxSparksTailSize; // Fireworks Sparks Colors layout // separator; text -label (uiRes("m_dynCreateClipEffectsLayout.kFireworksColorsAttributes")) -al "left" fwColorsAttrsT; checkBoxGrp -label $setColorProc -ncb 1 -v1 0 -label1 "" -on1 ("fwSparksSetUserColorProcCB " + $parent + " 1") -of1 ("fwSparksSetUserColorProcCB " + $parent + " 0") fwSparksSetUserColor; textFieldGrp -label $colorProc fwSparksColorCreationProc; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kNumSparkColors")) -field true -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -sliderStep 1 fwSparksNumColors; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSparksColorSpread")) -field true -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -sliderStep 1 fwSparksColorSpread; floatSliderGrp -label $glowIntensity -field true -min 0 -max 1 -pre 3 -step .1 fwSparksGlowIntensity; floatSliderGrp -label $incandescenceIntensity -field true -min 0 -max 1 -pre 3 -step .1 fwSparksIncanIntensity; } // ====================== createShatterLayout ====================== // // SYNOPSIS // Create a shatter clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc createShatterLayout( string $parent ) { setParent $parent; string $form = `formLayout`; string $tabs = `tabLayout -cc ("dynClipEffectsShatterTabCB " + $parent) -width 200 -innerMarginWidth 5 -innerMarginHeight 5 shatterTabLayout`; formLayout -edit -attachForm $tabs "top" 0 -attachForm $tabs "left" 0 -attachForm $tabs "bottom" 0 -attachForm $tabs "right" 0 $form; string $surfaceTab = createSurfaceShatterTabLayout( $parent ); string $solidTab = createSolidShatterTabLayout( $parent ); string $crackTab = createCrackShatterTabLayout( $parent ); tabLayout -edit -tabLabel $surfaceTab (uiRes("m_dynCreateClipEffectsLayout.kSurfaceShatter")) -tabLabel $solidTab (uiRes("m_dynCreateClipEffectsLayout.kSolidShatter")) -tabLabel $crackTab (uiRes("m_dynCreateClipEffectsLayout.kCrackShatter")) $tabs; string $shatterTypeValue = `tabLayout -q -selectTab shatterTabLayout`; setParent ..; setParent ..; } // ====================== createSurfaceShatterTabLayout ====================== // // SYNOPSIS // Create a surface shatter clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc string createSurfaceShatterTabLayout( string $parent ) { string $surfaceTab = `rowColumnLayout -numberOfColumns 1 -cw 1 700 shatterSurfaceTab`; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSurfaceShatterName")) shatterSurfaceName; // Shatter Attributes Controls // intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kShardCount")) -field true -min 2 -max 10 -fmx 10000 -step 1 shatterSurfaceShardCount; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kExtrudeShards")) -field true -min -1.0 -max 1.0 -fmn -10000.0 -fmx 10000.0 -step 1 shatterSurfaceExtrude; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSeedValue")) -field true -min 0 -max 100 -fmx 100000 -step 1 shatterSurfaceSeedValue; optionMenuGrp -label (uiRes("m_dynCreateClipEffectsLayout.kPostOperation")) -cc ("dynClipEffectsPostOperationCB " + $parent) shatterSurfacePostOperation; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kShapes")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kRigidBodiesCollisionsOff")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kSoftBodiesGoals")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kSoftBodiesLatticeGoals")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kSets")) ; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kTriangulateSurface")) -cc ("dynClipEffectsPostOperationCB " + $parent) -ncb 1 shatterSurfaceTriangulate; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kSmoothShards")) -ncb 1 shatterSurfaceSmoothing; radioButtonGrp -label (uiRes("m_dynCreateClipEffectsLayout.kOriginalSurface")) -nrb 3 -label1 (uiRes("m_dynCreateClipEffectsLayout.kNothing")) -label2 (uiRes("m_dynCreateClipEffectsLayout.kHide")) -label3 (uiRes("m_dynCreateClipEffectsLayout.kDelete")) -cc ("dynClipEffectsPostOperationCB " + $parent) shatterSurfaceOriginal; radioButtonGrp -label "" -nrb 1 -scl shatterSurfaceOriginal -label1 (uiRes("m_dynCreateClipEffectsLayout.kLinkToShards")) -cc ("dynClipEffectsPostOperationCB " + $parent) shatterSurfaceOriginal1; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kMakeOriginalSurfaceRigid")) -ncb 1 -en false shatterSurfaceMakeRigidBody; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kVerboseMode")) -ncb 1 shatterSurfaceVerbose; setParent ..; return $surfaceTab; } // ====================== createSolidShatterTabLayout ====================== // // SYNOPSIS // Create a solid shatter clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc string createSolidShatterTabLayout( string $parent ) { // Solid Shatter Tab // string $solidTab = `rowColumnLayout -numberOfColumns 1 -cw 1 500 shatterSolidTab`; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSolidShatterName")) shatterSolidName; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSolidShardCount")) -field true -min 2 -max 10 -fmx 10000 -step 1 shatterSolidShardCount; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kEdgeJagginess")) -field true -min 0.0 -max 1.0 shatterSolidEdgePerturbation; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSolidSeedValue")) -field true -min 0 -max 100 -fmx 100000 -step 1 shatterSolidSeedValue; optionMenuGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSolidPostOperation")) -cc ("dynClipEffectsPostOperationCB " + $parent) shatterSolidPostOperation; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kSolidShapes")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kSolidCollisionsOff")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kSolidSoftBodiesGoals")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kSolidSoftBodiesLatticeGoals")) ; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kRemoveInteriorPolygons")) -ncb 1 -v1 false -cc ("dynSolidShatterRemoveInteriorCB " + $parent) shatterSolidRemoveInterior; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSolidExtrudeShards")) -field true -min -1.0 -max 1.0 -fmn -10000.0 -fmx 10000.0 -step 1 -enable false shatterSolidExtrude; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kSolidTriangulateSurface")) -cc ("dynClipEffectsPostOperationCB " + $parent) -ncb 1 shatterSolidTriangulate; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kApplyInteriorMaterial")) -ncb 1 shatterSolidInteriorMaterial; radioButtonGrp -label (uiRes("m_dynCreateClipEffectsLayout.kSolidOriginalSurface")) -nrb 3 -label1 (uiRes("m_dynCreateClipEffectsLayout.kSolidNothing")) -label2 (uiRes("m_dynCreateClipEffectsLayout.kSolidHide")) -label3 (uiRes("m_dynCreateClipEffectsLayout.kSolidDelete")) -cc ("dynClipEffectsPostOperationCB " + $parent) shatterSolidOriginal; radioButtonGrp -label "" -nrb 1 -scl shatterSolidOriginal -label1 (uiRes("m_dynCreateClipEffectsLayout.kSolidLinkToShards")) -cc ("dynClipEffectsPostOperationCB " + $parent) shatterSolidOriginal1; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kSolidMakeOriginalSurface")) -ncb 1 -en false shatterSolidMakeRigidBody; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kSolidVerboseMode")) -ncb 1 shatterSolidVerbose; setParent ..; return $solidTab; } // ====================== createCrackShatterTabLayout ====================== // // SYNOPSIS // Create a crack shatter clip effect option box layout. // // INPUT ARGUMENTS // string $parent the parent layout // global proc string createCrackShatterTabLayout( string $parent ) { // Crack Shatter Tab. // string $crackTab = `rowColumnLayout -numberOfColumns 1 -cw 1 600 shatterCrackTab`; textFieldGrp -label (uiRes("m_dynCreateClipEffectsLayout.kCrackShatterName")) shatterCrackName; // Shatter Attributes Controls // intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kCrackCount")) -field true -min 1 -max 10 -fmn 0 -fmx 10000 -step 1 shatterCrackCount; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kCrackLength")) -field true -min 1 -max 500 -step 1 shatterCrackLength; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kShatterEdgeJagginess")) -field true -min 0.0 -max 1.0 shatterCrackEdgePerturbation; floatSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kShatterExtrudeShards")) -field true -min -1.0 -max 1.0 -fmn -10000.0 -fmx 10000.0 -step 1 shatterCrackExtrude; intSliderGrp -label (uiRes("m_dynCreateClipEffectsLayout.kShatterSeedValue")) -field true -min 0 -max 100 -fmx 100000 -step 1 shatterCrackSeedValue; optionMenuGrp -label (uiRes("m_dynCreateClipEffectsLayout.kShatterPostOperation")) -cc ("dynClipEffectsPostOperationCB " + $parent) shatterCrackPostOperation; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kCracksOnSurface")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kCrackShapes")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kCrackRigidBodiesCollisions")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kCrackSoftBodiesGoals")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kCrackSoftBodiesLatticeGoals")) ; menuItem -label (uiRes("m_dynCreateClipEffectsLayout.kCrackSets")) ; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kCrackTriangulateSurface")) -cc ("dynClipEffectsPostOperationCB " + $parent) -ncb 1 shatterCrackTriangulate; radioButtonGrp -label (uiRes("m_dynCreateClipEffectsLayout.kCrackOriginalSurface")) -nrb 3 -label1 (uiRes("m_dynCreateClipEffectsLayout.kCrackNothing")) -label2 (uiRes("m_dynCreateClipEffectsLayout.kCrackHide")) -label3 (uiRes("m_dynCreateClipEffectsLayout.kCrackDelete")) -cc ("dynClipEffectsPostOperationCB " + $parent) shatterCrackOriginal; radioButtonGrp -label "" -nrb 1 -scl shatterCrackOriginal -label1 (uiRes("m_dynCreateClipEffectsLayout.kCrackLinkToShards")) -cc ("dynClipEffectsPostOperationCB " + $parent) shatterCrackOriginal1; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kCrackMakeOriginalSurface")) -en false -ncb 1 shatterCrackMakeRigidBody; checkBoxGrp -label "" -label1 (uiRes("m_dynCreateClipEffectsLayout.kCrackVerboseMode")) -ncb 1 shatterCrackVerbose; setParent ..; return $crackTab; } // ====================== dynClipEffectsPostOperationCB ====================== // // Callback for the shatter effect post operation option menu. // This callback prints an warning if the user does not have // the tab button set when creating rigid bodies. // global proc dynClipEffectsPostOperationCB(string $parent) { setParent $parent; int $rigidBodyOption = false; int $originalSurface = -1; string $triangulateValue; string $optionValue; string $shatterTypeValue = `tabLayout -q -selectTab shatterTabLayout`; if ( $shatterTypeValue == "shatterSurfaceTab" ) { $optionValue = `optionMenuGrp -q -v shatterSurfacePostOperation`; $triangulateValue = `checkBoxGrp -q -v1 shatterSurfaceTriangulate`; $originalSurface = `radioButtonGrp -q -select shatterSurfaceOriginal`; if ( $originalSurface == 0 ) { $originalSurface = `radioButtonGrp -q -select shatterSurfaceOriginal1` + 3; } } else if ( $shatterTypeValue == "shatterSolidTab" ) { $optionValue = `optionMenuGrp -q -v shatterSolidPostOperation`; $triangulateValue = `checkBoxGrp -q -v1 shatterSolidTriangulate`; $originalSurface = `radioButtonGrp -q -select shatterSolidOriginal`; if ( $originalSurface == 0 ) { $originalSurface = `radioButtonGrp -q -select shatterSolidOriginal1` + 3; } } else if ( $shatterTypeValue == "shatterCrackTab" ) { $optionValue = `optionMenuGrp -q -v shatterCrackPostOperation`; $triangulateValue = `checkBoxGrp -q -v1 shatterCrackTriangulate`; $originalSurface = `radioButtonGrp -q -select shatterCrackOriginal`; if ( $originalSurface == 0 ) { $originalSurface = `radioButtonGrp -q -select shatterCrackOriginal1` + 3; } } if ( $optionValue == uiRes("m_dynCreateClipEffectsLayout.kRigidBodiesCollisionsOff") ) { $rigidBodyOption = true; } if ( ($triangulateValue == 0) && $rigidBodyOption ) { warning (uiRes("m_dynCreateClipEffectsLayout.kCreatingRigidBodies")); } if ( $originalSurface != 4 ) { $rigidBodyOption = false; } if ( $shatterTypeValue == "shatterSurfaceTab" ) { checkBoxGrp -e -enable $rigidBodyOption shatterSurfaceMakeRigidBody; } else if ( $shatterTypeValue == "shatterSolidTab" ) { checkBoxGrp -e -enable $rigidBodyOption shatterSolidMakeRigidBody; } else if ( $shatterTypeValue == "shatterCrackTab" ) { checkBoxGrp -e -enable $rigidBodyOption shatterCrackMakeRigidBody; } } // ====================== dynSolidShatterRemoveInteriorCB ====================== // // This callback enables/disables the extrude slider depending on the state // of the remove interior check box. // // global proc dynSolidShatterRemoveInteriorCB(string $parent) { setParent $parent; string $triangulateValue; string $optionValue; int $removeInterior = `checkBoxGrp -q -v1 shatterSolidRemoveInterior`; if ( $removeInterior ) { floatSliderGrp -e -enable true shatterSolidExtrude; checkBoxGrp -e -enable false shatterSolidInteriorMaterial; } else { floatSliderGrp -e -enable false shatterSolidExtrude; checkBoxGrp -e -enable true shatterSolidInteriorMaterial; } } // ====================== dynClipEffectsShatterTabCB ====================== // // Sets the option var for the tab layout. // global proc dynClipEffectsShatterTabCB(string $parent) { setParent $parent; string $shatterTypeValue = `tabLayout -q -selectTab shatterTabLayout`; optionVar -stringValue shatterType $shatterTypeValue; } // Callback for the fireworks Random Firesorks checkbox. // global proc fwSparksSetUserColorProcCB (string $parent, int $isOn) { // Enable/disable controls depending on the value of $isOn // setParent $parent; if ($isOn) { textFieldGrp -e -enable true fwSparksColorCreationProc; } else { textFieldGrp -e -enable false fwSparksColorCreationProc; } } global proc fwTrailSetUserColorProcCB (string $parent, int $isOn) { // Enable/disable controls depending on the value of $isOn // setParent $parent; if ($isOn) { textFieldGrp -e -enable true fwTrailColorCreationProc; } else { textFieldGrp -e -enable false fwTrailColorCreationProc; } }