• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Premiere Pro Scripting (QE) - Referencing a newly created Layer

Explorer ,
Feb 03, 2021 Feb 03, 2021

Copy link to clipboard

Copied

Hi! I've been trying to add a "newTransparentVideo();" and was able to do so but, since it returns a bool I cant find a way to reference it to add effects &/or rename.
You might think just looking into the "rootItem" and looking for the default name would be a solution but, from one language to another, the name changes so that cant be an option.

this is my last hope. Thank you whoever can help me!

 

 

PS: pretty please update the API... since 2012 I see "updating soon" and yet there is still "Effects Match Names" that have no use for the only line to create effect (getVideoEffectByName() ). I can make a list of things that makes no sence but I dont blame anyone I just find it odd.

TOPICS
Effects and Titles , Error or problem , How to , SDK

Views

413

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 1 Correct answer

Contributor , Feb 03, 2021 Feb 03, 2021

One way would be to get nodeId of each item in root and then compare them with nodeId after creating new item.

Though, surprisingly, it is much easier:

var numItems = app.project.rootItem.children.numItems; // num of items in root, before creating new one

// here goes your code to create new item

var newItem = app.project.rootItem.children[numItems]; // your new item

 Any new item is just pushed to array.

Votes

Translate

Translate
Contributor ,
Feb 03, 2021 Feb 03, 2021

Copy link to clipboard

Copied

One way would be to get nodeId of each item in root and then compare them with nodeId after creating new item.

Though, surprisingly, it is much easier:

var numItems = app.project.rootItem.children.numItems; // num of items in root, before creating new one

// here goes your code to create new item

var newItem = app.project.rootItem.children[numItems]; // your new item

 Any new item is just pushed to array.

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
Explorer ,
Feb 03, 2021 Feb 03, 2021

Copy link to clipboard

Copied

LATEST

Wow... I thought about it but did not think that would actually work im feeling so dumb. I Thank you so much!

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