/* This script take an selected object makes an instance of it and and bakes whatever animation is on the selected object on to the instanced object. the animation is baked for the active time range To use: select an object in the scene and run script -user selects object on a path -get name of object -make an instance of the object -make the original object a parent constraint of the instanced object -get active time range for the bake command -bake animation onto the instanced object -indicate that bake is complete written by jonathan paton and completed on 2/27/08 */ global proc bakeSplineAnimation() { string $PathObjectArray[] = `ls -sl`; if (`size $PathObjectArray` == 0) { confirmDialog -title "Confirm" -message "Select the object you want instanced and baked" -button "Ok" -defaultButton "Yes"; } string $PathObject = $PathObjectArray[0]; string $instancedObject = ($PathObject + "_Baked"); string $instancedObjectParent = ($instancedObject + "_Temp"); instance -n $instancedObject $PathObject; parentConstraint -weight 1 -n $instancedObjectParent $PathObject $instancedObject; $startTime = `playbackOptions -q -minTime`; $endTime = `playbackOptions -q -maxTime`; string $playBackTimeRange = ($startTime + ":" + $endTime); bakeResults -sm true -t $playBackTimeRange -sb 1 -dic true -pok true -sac false -cp false -s true $instancedObject; delete $instancedObjectParent; confirmDialog -title "Confirm" -message ("Animation from " + $PathObject + " has been baked into new object " + $instancedObject) -button "Ok" -defaultButton "Yes"; } /***********************END***************************/