Jan 24, 2012

Key Tick Color Change for Key Poses (MEL Script)

My buddy Dave Roth, a technical artist, came up with this nice MEL script to change the key ticks on the timeline. This is to separate the major Key Poses from the other key ticks. It's a good idea to visually know exactly what are the Key Poses (Golden Poses) on your timeline so that you can refer to them quickly without having to scrub in the timeline and to look for them.

Side notes: 
1) You can only use one color as the alternate color for the Key Poses (unfortunately). I'm hoping for an update from Dave Roth is the future. 
2) To put the Key Tick from the alternate color back to red, just hit S again on that Key Tick. 

Here is the script and a quick tutorial on how to use it.... enjoy!:




proc SetAlternateColor()
{
colorEditor;
if (`colorEditor -query -result`)
{
float $values[];
$values = `colorEditor -query -rgb`;
displayRGBColor "timeSliderTickDrawSpecial" $values[0] $values[1] $values[2];
}
else
{
error ("You must hit OK to change the alternate color.\n");
}
}
if (`menuItem -q -ex AlternateDivider` == 1)deleteUI AlternateDivider;
if (`menuItem -q -ex AlternateColorMenu` == 1)deleteUI AlternateColorMenu;
if (`menuItem -q -ex AlternateMenuColorPicker` == 1)deleteUI AlternateMenuColorPicker;
if (`menuItem -q -ex AlternateColorToggle` == 1)deleteUI AlternateColorToggle;
menuItem -parent TimeSliderMenu -divider true AlternateDivider;
menuItem -parent TimeSliderMenu -subMenu true -label "Alternate Color" AlternateColorMenu;
menuItem -parent AlternateColorMenu -label "Color Picker" -command "SetAlternateColor();" AlternateMenuColorPicker;
menuItem -parent AlternateColorMenu -label "Alternate Color" -c "keyframe -time `currentTime -q` -tds 1;" AlternateColorToggle;











No comments: