Thursday, February 10, 2011

LastKeyValue Proc


okay slight tweak to the nextKeyValue proceedure i wrote to quicken up your anim pipeline...this script snaps all the keys to the value based off the last keyframe selected as opposed to the first ( the original script). nearly there on making it possible to have more than 1 curve selected and each snapping to their respected values. also working on a script that spline and flat tangents all your keys for your out of stepped, soyou dont have to go in and micromanage right in the begining of animating....


proc lastKeyValue()
{
string $animCurves[] = `keyframe -q -name`;
float $selectTimes[] = `keyframe -q -sl -timeChange`;
float $selectValues[] = `keyframe -q -sl -valueChange`;
float $selectTimesLast[] = `keyframe -q -lsl -timeChange`;
float $selectValuesLast[] = `keyframe -q -lsl -valueChange`;
float $allTimes[] = `keyframe -q -timeChange $animCurves[0]`;
float $allValues[] = `keyframe -q -valueChange $animCurves[0]`;


// Sets selected keyframe values to the last keyframe value
// in a selection and flattens their tangents.

for ( $i = 0; $i < `size $allTimes`; $i++ )
{
for ( $a = 0; $a < `size $selectTimes`; $a++ )
{
if ( ( $allTimes[$i] == $selectTimes[$a] ))
{
keyframe -e -index $i -valueChange $selectValuesLast[0] $animCurves[0];

keyTangent -inTangentType flat -outTangentType flat -t $selectTimes[$a] $animCurves[0];

}
}
}
};
lastKeyValue;



Shiver me timbers, It's internet gold!

style inspiration
concept art
concept art world
ISO50 design
vfx stock elements
matte painting
matte painting tips
dylan cole
nerdboyfriend style

No comments: