Skip to main content
This topic has been closed for replies.

2 replies

Jarda Bereza
Inspiring
December 6, 2017

Do you mean resizing algorithm?

olivu1568674
Known Participant
December 14, 2017

I think you could understnd it by refereing above image

Legend
December 14, 2017

Unfortunately I found only how to set the value (for example for the current keyframe or for all keyframes like in the function below).

Any attempts to read the value give an error both in CS6 and in CC2018.

I hope this is also useful.

//set_animation_interpolation(false)

function set_animation_interpolation(lin)

    {

    try {

        // select all keyframes

        var r = new ActionReference();

        r.putEnumerated( stringIDToTypeID( "animationKey" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Al  " ) );

        var d = new ActionDescriptor();

        d.putReference( charIDToTypeID( "null" ), r );

        executeAction( charIDToTypeID( "slct" ), d, DialogModes.NO );

        var r = new ActionReference();

        r.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "animInterpStyle" ) );

        r.putEnumerated( stringIDToTypeID( "animationKey" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );

        var d = new ActionDescriptor();

        d.putReference( charIDToTypeID( "null" ), r );

        d.putEnumerated( charIDToTypeID( "T   " ), stringIDToTypeID( "animInterpStyle" ), lin?stringIDToTypeID("linear"):stringIDToTypeID("hold") );

        executeAction( charIDToTypeID( "setd" ), d, DialogModes.NO );

        // deselect all keyframes

        var r = new ActionReference();

        r.putEnumerated( stringIDToTypeID( "animationKey" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "None" ) );

        var d = new ActionDescriptor();

        d.putReference( charIDToTypeID( "null" ), r );

        executeAction( charIDToTypeID( "slct" ), d, DialogModes.NO );

        }

    catch(e) { alert(e) }

    }

Legend
December 6, 2017

I do not work with animation. Could you show (maybe a screenshot) where to set and how to look at nterpolation in the animation? Probably and it will turn out to help.

olivu1568674
Known Participant
December 14, 2017