Skip to main content
Participant
April 30, 2023
Answered

Accessing clips inside bins using Extendscript

  • April 30, 2023
  • 2 replies
  • 592 views

Hey everyone,

 

Apologies if this is a common sense answer (it certainly sounds like it would be). I'm trying to use extendscript to assign a clip in my project window to a variable. So I've figured out how to access most things in the project window. I just type "

app.project.rootItem.children[index]" That's simple enough. But I can't figure out how to get inside bins. I've tried using multiple indexes like this "
app.project.rootItem.children[index][index]" but that doesn't do it. Does anyone know how I could accomplish this? 
This topic has been closed for replies.
Correct answer Bruce Bullis

Take a look at how PProPanel walks all project bins and items, to dump their XMP; it checks whether bins have any children.

https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPRO/Premiere.jsx#L1089


2 replies

Bruce Bullis
Bruce BullisCorrect answer
Legend
April 30, 2023

Take a look at how PProPanel walks all project bins and items, to dump their XMP; it checks whether bins have any children.

https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPRO/Premiere.jsx#L1089


Participant
April 30, 2023

Apologies everyone, looks like I figured it out. If anyone else ends up with the same question and finds this, you need to add ".children" a second time as well. So it would look like this: "

app.project.rootItem.children[index].children[index]"