/* keyframeHierarchy.mel Creation Date: 6-7-99 Author: robin (robin@uberware.net) http://www.uberware.net/mel/ Description: set rotate keyframes for the entire skeleton with only one joint selected. Usage: keyframeHierarchy; Notes: This script requires that the top node of the skeleton have the word "Skeleton" in it. This can be either the root joint or a group node above that. Note that it doesn't set a keyframe on that parent node, but will keyframe EVERY node below. Also, since it keyframes only rotations. You'll have to do transforms or scales yourself. I have this mapped to Alt+k. Version 1.1: 6-14-99 - Added error checking to stop infinite looping if misused - output is formatted correctly so you can copy and paste from from the script editor correctly. Disclaimer: Use and modify at your own risk! */ global proc keyframeHierarchy() { string $array[] = `ls -tr -sl`; while (!`gmatch $array[0] "*Skeleton*"` && size($array)) $array = `listRelatives -p $array[0]`; if (size($array)) { print ("keyframeHierarchy ; // " + $array[0] + "\n"); $array = `listRelatives -c $array[0]`; while (size($array)) { setKeyframe -at rotate $array; $array = ls ("-tr",`listRelatives -c $array`); } } else warning "Could not find root of skeleton"; }