// =========================================================================== // 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: Nov. 5, 1997 // // Procedure Name: // doBakeSimulation // // Description: // This is the actual function that calls from the "Bake Simulation" // option box. // // Input Arguments: // $useTS true : use the current time slider range for the simulation // false : use the $start and $end values for the simulation // $start, $end : only applicable if $useTS is true // $by : the increment from start to end time of simulation with which // to view frames and capture keyframes // // $below 0/1 : bake on selected items only, or all below // $control 0/1 : if 1 and a transform above a shape is selected, // bake animation of all control points also // $shapes 0/1 : if 1 and a transform above a shape is selected, // bake attributes of shape as well // (excluding control pts) // $imp 0/1 : if we're baking attributes that are controlled by an // implicit animation (i.e. with no explicit DG connections), // then if 1, turn off this implicit control after the // bake is complete (e.g. turn off the IK handle's // effects after baking skeleton joints, controlled by IK) // $useCB 0/1 : if 1, set keyframes on attrs specified in channel box // $preserveOutsideKeys 0/1 : if 1, preserve keys that are ouside the bake // range when there are directly connected anim // curves // // Return Value: // None // global proc doBakeSimulation( int $useTS, float $start, float $end, float $by, int $below, int $cp, int $shapes, int $imp, int $useCB ) { string $args[9]; $args[0] = $useTS; $args[1] = $start; $args[2] = $end; $args[3] = $by; $args[4] = $below; $args[5] = $cp; $args[6] = $shapes; $args[7] = $imp; $args[8] = $useCB; doBakeSimulationArgList( "1", $args ); }