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.
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.
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.
Copy link to clipboard
Copied
Wow... I thought about it but did not think that would actually work im feeling so dumb. I Thank you so much!