• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

setValue fails in Position property

Community Beginner ,
Dec 08, 2019 Dec 08, 2019

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

TOPICS
Error or problem , SDK

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Adobe Employee , Dec 09, 2019 Dec 09, 2019

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

Votes

Translate

Translate
Adobe Employee , Feb 06, 2020 Feb 06, 2020

Sorry for the lack of update; this is fixed, in New World, in 14.0.1.

Votes

Translate

Translate
Adobe Employee ,
Dec 09, 2019 Dec 09, 2019

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 06, 2020 Feb 06, 2020

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

Sorry for the lack of update; this is fixed, in New World, in 14.0.1.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

Thanks! Awesome to see that this has been fixed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 06, 2020 Feb 06, 2020

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 07, 2020 Feb 07, 2020

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 07, 2020 Feb 07, 2020

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 07, 2020 Feb 07, 2020

Copy link to clipboard

Copied

LATEST

I see some odd behavior here; we're looking into it. Tracking as DVAPR-4221791.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines