Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is there any way to get interpolation type in Photoshop animation using JSX script?

Community Beginner ,
Dec 06, 2017 Dec 06, 2017

I want to get the interpolation type of an animation using JSX script.

Is it possible?

If yes, How do we do it?

TOPICS
Actions and scripting
3.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
People's Champ ,
Dec 06, 2017 Dec 06, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2017 Dec 14, 2017

interpolation.PNG

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 06, 2017 Dec 06, 2017

Do you mean resizing algorithm?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2017 Dec 14, 2017

I think you could understnd it by refereing above image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Dec 14, 2017 Dec 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) }

    }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 14, 2017 Dec 14, 2017
LATEST

If you mean this image 

interpolation.PNG

It look strange to me. Layer 1 thumbnail look empty. It looks like you opened a new document Untitled-1 with a white background layer.  You than added and new empty layer "Layer 1".  Used the button pull-down in the timeline palette selected create  video timeline  and use the button to create your video timeline.  You  set two position key frames the first when you clicked on the position stopwatch then you the position the play head and most likely used the active move tool the set the second key frame position].  There is some pop-up menu:

I do not know if there is anything in Layer 1 or how you get that menu to open that is in your capture.  What did you do exactly? What is being Interpolated if anything? What would a Photoshop script look for in your Photoshop documents video timeline to see if its is being interpolated? You show a very simple Video Timeline.   Typical video timelines are much more complex than what you have captured.

Many things you can do in Photoshop can not be scripted and it is not clear as to what you are trying to do here.

I did find that pop-up menu opens with a righr click on the key frams diamond.  Seem to show the checked current linear Interpolation and you can change it to Hold Interpolation and the diamon changes to a square and  and hold Interpolation is then the checked item.

Many things about a document can not be retrived usingi Photoshop scripting and action manager code.

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines