Copy link to clipboard
Copied
I want to get the interpolation type of an animation using JSX script.
Is it possible?
If yes, How do we do it?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Do you mean resizing algorithm?
Copy link to clipboard
Copied
I think you could understnd it by refereing above image
Copy link to clipboard
Copied
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) }
}
Copy link to clipboard
Copied
If you mean this image
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.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now