Currently trying out UXP in Premiere Pro 26.2.0 (BETA). I am trying to add some keyframes to a ComponentParam. I am simply getting access to the Motion Component and grabbing the Bottom Crop param. In the example below I am trying to:
Set a keyframe with value 50% at 0 seconds
Set another keyframe with value 40% at 5 seconds
I’ve debugged the values and they all look correct to me, but after executing this code I do not see any of the keyframes in the Effect Controls panel, nor any effect in the video preview. It seems to just set the ComponentParam value as if isn’t an animated param.
In the image below you can see that the value is set to 40% (the last keyframe I set), and it also looks like keyframing is enabled, but no keyframes actually appear on the timeline. It seems to be completeley ignoring the time I set. I tried debugging the program and the tick time objects look valid to me and report back the correct values.
This feels like a bug to me, but I may be doing something wrong…
Here is what the result looks like after the code executes. As you can see the parameter is animated, but no keyframes appear on the timeline. Although, it did change the value to 40% which is the last action I requested, which makes me think it is still treating it as a non-animated param.
Adding more info to this. I thought this was a UXP issue, but it looks to be more like a me problem. I’ve tried switching over to ExtendScript and trying the same technique, I have a very simple example where I set the the first component param to have 2 keyframes. I get the same result where time varying is enabled in Premiere’s UI but I don’t see any keyframes set inside of the Effects Controls panel.
Additionally I added more debug lines surrounding the UXP and ExtendScript behavior, checking the list of keyframes set via getKeyframeListAsTickTimes. My code displays that all of the keyframes are set exactly how I intended, but the UI in premiere does not reflect this at all. This is also the case for ExtendScript.
Additionally, I’ve tried both the PProPanel Example and the UXP Sample project and I get the same exact results with those; keyframes are set, but the UI does not reflect the changes.
Could anyone be very kind and help me out? I’m sure I’m doing something wrong, but I’m unsure what it is…
Just out of curiosity, I tried using the exact same script on a different PC and it seemed to work there…
Still unsure why this isn’t working on my main computer. Going to try to re-install the entire suite.
This is the script in question:
var project = app.project;
var projectItem = project.rootItem;
var activeSequence = project.activeSequence;
var videoTracks = activeSequence.videoTracks;
var trackOne = videoTracks[0];
var clip = trackOne.clips[0];
var components = clip.components;
var opacityComponent = components[0].properties[0];
var duration = clip.end;
opacityComponent.setTimeVarying(true);
var time1 = new Time();
time1.seconds = clip.inPoint.seconds;
var time2 = new Time();
time2.seconds = clip.inPoint.seconds + 5;
opacityComponent.addKey(time1);
opacityComponent.addKey(time2);
opacityComponent.setValueAtKey(time1, 0);
opacityComponent.setValueAtKey(time2, 90);
I’m seeing the same behavior using UXP.
It seems like UXP has the data but it’s not reflected back in premiere.
Looks like a bug to me - hopefully it is on Adobe’s radar (it should be now that you raised it).
The data is there (allKeyframeTicktimes has many entries - although surprisingly it has 37 entries).
Interpolation between keypoints seems to work as well:
Yeah… We might still be misusing it though.
Hard to tell with the sparse docs and the lack of working sample for this scenario.
I noticed a class PointKeyFrame (pretty much empty of any methods and description) in the official doc.
Hence I’m wondering it this is not a placeholder for this type of scenario ? (that maybe one would need to instantiate with a type of unexposed “createPointKeyframe” API - similar to createKeyframe. Or maybe require a cast in between the types, but even if this is the case, not exposed yet).
Unless we have clarity from Adobe’s team, we are just guessing at the expected syntax to use