setValueAtKey and addKey on Pictures
Hello everybody,
Can you say me if Premiere SDK supports addKey on pictures ?
When I attempt to add addKey (on opacity) on movies, it works, but if I try on pictures (.jpg, .png...), it doesn't work : I used this script (https://forums.adobe.com/thread/2471227)
I don't understand, anyone can help me ? 2 weeks that I'm looking for, I'm going crazy. Thank you.
var proj = app.project;
var seq = proj.activeSequence;
var time = seq.getPlayerPosition(); // CTI = Current Time Indicator.
var time2 = seq.getPlayerPosition();
var time3 = seq.getPlayerPosition();
time2.seconds += 1;
time3.seconds += 2;
var videoTracks = seq.videoTracks;
var track = videoTracks[0];
for (var j = 0; j < track.clips.numItems; j++) {
var clip = track.clips
for (var k = 0; k < clip.components.numItems; k++) {
var component = clip.components
// Trajectory
for (var l = 0; l < component.properties.numItems; l++) {
var property = component.properties
if (property.displayName == "Scale") {
// Scale
if (!property.isTimeVarying()) {
property.setTimeVarying(true);
}
property.addKey(time);
property.addKey(time2);
property.addKey(time3);
var k = property.getKeys();
if (property.areKeyframesSupported() == true) {
var result = property.getValueAtKey(time);
property.setValueAtKey(time, 100, true);
property.setValueAtKey(time2, 200, true);
property.setValueAtKey(time3, 300, true);
}
}
}
}
}
