Unable to set value of a 2D point component parameter

When I try to set the value of a 2D point parameter (such as Position in the Motion group) through the UXP API (createKeyframe, createSetValueAction) I get an error - “Error: Illegal Parameter type”.

Simple numeric values (such as Scale) work fine. I am able to get the value of the parameter - it returns an array with two numbers, as expected. But if I pass a similar array to the set value action, I get the error.

Here’s a panel to reproduce the bug, together with a Premiere project: uxp-sandbox/set-2d-point-value at main · miscer/uxp-sandbox · GitHub. I’m using beta build 30 at the moment.

Hi!

This happens because createKeyFrame() is looking for PointF Object for point parameter value creation, so doing

const newPoint = await ppro.PointF(0,0);
const keyframe = param.createKeyframe(newPoint); 

should resolve the “Illegal Parameter Type” error

Please let me know if you are still seeing any issue!

Thanks for trying out UXP!

3 Likes

Thanks, using PointF instead of an array works :slight_smile:

1 Like