# [PPro UXP 26] How do I write a PointKeyframe value? (Motion / Transform Position)

# [PPro UXP 26] How do I write a PointKeyframe value? (Motion / Transform Position)

## Environment

- Premiere Pro 26.0.2 (Windows 11)

- UXP plugin (`require(“premierepro”)`)

- Target: write keyframes to `AE.ADBE Motion` Position (also tested `AE.ADBE Geometry2` Transform Position — same result)

## Goal

Programmatically add N keyframes at specified times, each with a specified 2D value (for a random-wiggle tool).

## What works

- `param.createSetTimeVaryingAction(true)` (committed in its own `executeTransaction`)

- `param.getStartValue()` / `param.getValueAtTime(tt)` — returns a `PointKeyframe` whose `.value` getter returns a plain Object `{ value: [x, y] }`

- Mutating `.position`: `tmpl.position = tickTime` works (new position read back correctly)

- `param.createAddKeyframeAction(tmpl)` (single-arg) — committed one-per-transaction, creates a keyframe at `tmpl.position` using `tmpl`'s **current C++ value** (the start value, which I cannot override)

Result: I can create N keyframes at arbitrary times but they all have the same (start) value.

## What fails

### 1) Writing `tmpl.value` (any shape)

```js

tmpl.value = [0.2, 0.2]; // Illegal Parameter type

tmpl.value = { value: [0.2, 0.2] }; // Illegal Parameter type

tmpl.value = tmpl.value; // Illegal Parameter type (round-trip!)

```

The round-trip failing is the smoking gun — the getter returns a plain JS object (`Object.getPrototypeOf(tmpl.value) === Object.prototype`) that the setter refuses.

### 2) `param.createKeyframe(…)`

```js

param.createKeyframe() // Not Enough Parameters

param.createKeyframe(tt) // Unknown error exception

param.createKeyframe(tt, [0.2, 0.2]) // Unknown error exception

param.createKeyframe(tt, {value:[0.2,0.2]}) // Unknown error exception

param.createKeyframe([0.2, 0.2]) // Illegal Parameter type

param.createKeyframe({value:[0.2,0.2]}) // Illegal Parameter type

param.createKeyframe(tt, tmpl) // Unknown error exception

param.createKeyframe(tt, tmpl.value) // Unknown error exception

```

### 3) `param.createSetValueAction(…)`

```js

param.createSetValueAction([0.2, 0.2]) // Illegal Parameter type

param.createSetValueAction({value:[0.2,0.2]}) // Illegal Parameter type

param.createSetValueAction(tt, [0.2, 0.2]) // Illegal Parameter type

param.createSetValueAction(tmpl) // returns Action (!), but executes with tmpl’s unchanged start value

param.createSetValueAction(kfPtr) // same — Action returned, no effective value change

```

### 4) `param.getKeyframePtr(tt)` returns a live `PointKeyframe`

```js

kfPtr.value = {value: [0.2, 0.2]}; // Illegal Parameter type (same as tmpl)

```

### 5) `ppro.PointKeyframe` / `ppro.Keyframe` access

```js

Object.keys(ppro).includes(“PointKeyframe”) // true

ppro.PointKeyframe // undefined

Object.getOwnPropertyDescriptor(ppro, “PointKeyframe”)

// { get: undefined, set: undefined, value: undefined, enumerable: true, configurable: … }

```

Own enumerable property with no getter, setter, or value. No factory reachable.

### 6) `Object.defineProperty` shadow

```js

Object.defineProperty(tmpl, “value”, { value: {value:[0.2,0.2]}, writable: true });

// read-back shows shadow value, but createSetValueAction(tmpl) / createAddKeyframeAction(tmpl)

// executes with the ORIGINAL backing C++ value, not the shadow.

```

## `param` prototype methods (full)

```

displayName, createKeyframe, getValueAtTime, findNearestKeyframe,

findNextKeyframe, findPreviousKeyframe, createRemoveKeyframeAction,

createRemoveKeyframeRangeAction, createSetValueAction, createAddKeyframeAction,

createSetTimeVaryingAction, getStartValue, getKeyframeListAsTickTimes,

getKeyframePtr, isTimeVarying, createSetInterpolationAtKeyframeAction,

areKeyframesSupported, constructor

```

## `PointKeyframe` prototype (all own names including non-enumerable)

```

value, position, constructor

```

(Parent = `Object`. No hidden symbols, no non-enumerable fields on the instance.)

## Question

**Is there a supported way to write a custom value to a `PointKeyframe`?**

- If yes, what is the exact call?

- If no, is there a roadmap item for exposing this?

A minimal repro is attached. I’ve tested both Motion and Transform Position params — identical behavior on both. CEP/ExtendScript path on PPro 26 is also broken for us (keys get written internally via `addKey`/`setValueAtKey` but the render pipeline ignores them entirely).

Thanks for any pointers.

## Minimal repro (drop into a UXP panel onclick handler)

```js

const ppro = require(“premierepro”);

const project = await ppro.Project.getActiveProject();

const sequence = await project.getActiveSequence();

const sel = await sequence.getSelection();

const [clip] = await sel.getTrackItems(1, false);

const chain = await clip.getComponentChain();

let comp;

for (let i = 0; i < await chain.getComponentCount(); i++) {

const c = await chain.getComponentAtIndex(i);

if ((await c.getMatchName()) === “AE.ADBE Motion”) { comp = c; break; }

}

let param;

for (let i = 0; i < await comp.getParamCount(); i++) {

const p = await comp.getParam(i);

if ((p.displayName || “”).toLowerCase().includes(“position”)) { param = p; break; }

}

await project.executeTransaction(ca => ca.addAction(param.createSetTimeVaryingAction(true)), “TV”);

const tmpl = await param.getStartValue();

const inTP = await clip.getInPoint();

const outTP = await clip.getOutPoint();

const mid = Math.floor((Number(inTP.ticks) + Number(outTP.ticks)) / 2);

const tt = ppro.TickTime.createWithTicks(String(mid));

tmpl.position = tt; // works

// vvv none of these succeed

try { tmpl.value = [0.2, 0.2]; } catch(e) { console.log(e.message); } // Illegal Parameter type

try { tmpl.value = { value: [0.2, 0.2] }; } catch(e) { console.log(e.message); } // Illegal Parameter type

try { tmpl.value = tmpl.value; } catch(e) { console.log(e.message); } // Illegal Parameter type

// ^^^

await project.executeTransaction(ca => ca.addAction(param.createAddKeyframeAction(tmpl)), “AddKF”);

console.log(JSON.stringify(await param.getValueAtTime(tt)));

// => {“value”:[0.5,0.5]} (always start value — cannot inject custom value)

```