Skip to main content
mitchd24971633
Participant
February 5, 2026
Question

Unable to set mutliple keyframes with UXP

  • February 5, 2026
  • 3 replies
  • 101 views

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 all of the keyframes. It seems to just set the ComponentParam value as if there wasn’t multiple keyframes.

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...


Code Example:

let success = false;

  try {

    project.lockedAccess(() => {

      const setTimeVaryingAction = componentParam.createSetTimeVaryingAction(value);

      success = project.executeTransaction((compoundAction) => {

        compoundAction.addAction(setTimeVaryingAction);

      }, "SetTimeVaryingAction");

    });

  } catch (err) {

    throw Error("Failed to change time varying");

  }

  project.lockedAccess(() => {

        project.executeTransaction(compoundAction => {

               const keyframe1 = param.createKeyframe(50);

                keyframe1.position = createTickTime(0);

                keyframe1.setTemporalInterpolationMode(premiere.Constants.InterpolationMode.LINEAR);

                const addAction2 = param.createAddKeyframeAction(keyframe1);

                compoundAction.addAction(addAction2);

 

                const keyframe2 = param.createKeyframe(40);

                keyframe2.position = createTickTime(5);

                keyframe2.setTemporalInterpolationMode(premiere.Constants.InterpolationMode.LINEAR);

                const addAction = param.createAddKeyframeAction(keyframe2);

                compoundAction.addAction(addAction);

        }, “test”);

    });

    3 replies

    Editor Andrew
    Participant
    April 6, 2026

    I’ve figured it out. You need to not only account for the clip start time from .getStartTime() but also the in point from .getInPoint()

    If the clip doesn’t rely on actual footage (i.e. it’s an adjustment layer, image, text layer, black video, transparent video etc.) then the in point is set at 1 hour. Probably so you can drag the beginning back a couple frames or seconds if you want, the developers never imaged you’d insert a text layer 1+ hours after the point in the timeline you need it.
     

    If it’s a regular video clip from footage, the in point is zero. It looks like you’ve been doing your testing on a .png, so it’s adding the keyframes 1 hour before the start of your timeline.

    I’m not sure what you named your VideoClipTrackItem, but if it’s called “clip” you would add:
    clipInPoint = await clip.getInPoint();
    keyframe1.position = keyframe1.position.add(clipInPoint)

    Editor Andrew
    Participant
    April 6, 2026

    I’m also experiencing this issue, .createAddKeyframeAction() doesn’t add keyframes.

    Editor Andrew
    Participant
    April 6, 2026

    I’ve figured out so far it does not work for a text layer or adjustment layer,

    but it DOES work for a video clip. Like from footage.

    Kevin J. Monahan Jr.
    Community Manager
    Community Manager
    March 5, 2026

    Hi,

    I read your message. I sent it on to our engineering team, so I hope they can help you with this one. Sorry for the frustration.

     

    Thanks,

    Kevin

     

    Kevin Monahan - Sr. Community and Engagement Strategist – Adobe Pro Video and Audio
    Editor Andrew
    Participant
    April 6, 2026

    Any updates?