Copy link to clipboard
Copied
Hello, I have encountered the following problem in Adobe Premiere 2020:
It is not possible to set the Position property of an item using ExtendScript.
Doing a getValue() returns an array, but when trying to do a setValue with an array gives an 'Illegal parameter type' error. This is not the case in Premiere 2019, where this code works perfectly:
app.project.activeSequence.videoTracks[1].clips[0].components[1].properties[0].setValue([0.5,0.5],true);
This code will throw an error in Premiere 2020 but work flawlessly in 2019. Position property is therefore completely inaccessible, as well as other properties that requiere an array.
Thanks
In my testing, the ExtendScript you provided works fine in 14.0, if you have not turned on New World scripting. It fails (with an illegal param type error), with New World on. [If New World is on, the same call fails in 13.x too.]
We're tracking the issue as DVAPR-4220968; I'll keep this thread informed of our progress.
Version decoder: "2020" = 14.x, "2019" = 13.x
Sorry for the lack of update; this is fixed, in New World, in 14.0.1.
Copy link to clipboard
Copied
In my testing, the ExtendScript you provided works fine in 14.0, if you have not turned on New World scripting. It fails (with an illegal param type error), with New World on. [If New World is on, the same call fails in 13.x too.]
We're tracking the issue as DVAPR-4220968; I'll keep this thread informed of our progress.
Version decoder: "2020" = 14.x, "2019" = 13.x
Copy link to clipboard
Copied
Is there any news on this. I'd hate to upgrade to a new Premiere that enables new world scripting and have my scripts not work.
For now I can downgrade to the old world scripting and hope I didn't use anything new. 😕
Copy link to clipboard
Copied
Sorry for the lack of update; this is fixed, in New World, in 14.0.1.
Copy link to clipboard
Copied
Thanks! Awesome to see that this has been fixed
Copy link to clipboard
Copied
Are you sure you have the version correct? I'm running v14.0.1 (Build 71) and setValue for position does not work with new world. If I disable new world it does work.
Copy link to clipboard
Copied
Perhaps I have the version wrong, and it's fixed in a version from the not-too-distant future.
Could you send the project containing the sequence you're working with, where your snippet fails in New World, and works in Old World?
Copy link to clipboard
Copied
It's not project specific. I've tried creating a test snippet, but I don't have an easy way to create a minimal project and code now.
I'm using TypeScript and have abstracted quite a bit, but I'm attempting to show the context and types here so you can understand the error.
testSetPosition: function() {
let sel = selectedVideoClips();
let clip : Adobe.TrackItem = sel[0].clip;
let comp = getComponent( clip, compMotionName );
let prop = getProperty( comp, propPositionName );
let aeprop : Adobe.ComponentParam = prop.aeprop;
try {
aeprop.setValue( [0.25, 0.25], true );
let v = aeprop.getValue();
aeprop.setValue(v, true);
} catch( e ) {
aeLog(e);
}
},
I get an "Illegal Parameter Type" error on both version of `setValue` (I comment the other one out). Both of these work without New World scripting and both fail with it. It's nothing fancy, just trying to set an array value for position, or just using the old value.
This is the `Position` property of the `Motion` component.
Copy link to clipboard
Copied
I see some odd behavior here; we're looking into it. Tracking as DVAPR-4221791.