Enable/Disable a TrackItem object using ExtendScript?

Engaged ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

Hi All

Is there anyway to get/set the "Enable" state of a clip in a sequence using ExtendScript?

I've created (am creating) a simple sequence info panel to assist our producers in their paperwork. If the working state of clip in the sequence is disabled then I'd like my panel/script to simply ignore it (much as I can ignore entire tracks based on their 'isMuted' state).

I had a look at the TrackItem properties, at least all those that I could find (including the unsupported QE DOM) but couldn't find any reference to an item's "state". That said, I'm only just discovering the whole 'reflection' thing so it's entirely possible I've missed it. Does anyone know if it's currently possible?

I realise I can export an FCP XML of the sequence and then parse that, but I was hoping to handle everything directly within the app's API if at all possible.

Thanks in advance

Andy

TOPICS
ExtendScript API, Premiere Pro SDK, Scripting, SDK

Views

939

Likes

translate

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

Adobe Employee , Jan 30, 2017 Jan 30, 2017
There is no state; a trackItem is either present, or not. [Of course, you could set present trackItems to 0% opacity...]

Likes

translate

Translate

Translate
Adobe Employee ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

There is no state; a trackItem is either present, or not. [Of course, you could set present trackItems to 0% opacity...]

Likes

translate

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
Engaged ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

Cheers Bruce,

Just for clarity, I'm referring to a sequence clip instance's "Enable" status, something which very much does exist at the UI level (e.g. the default Premeire Pro keyboard shortcut to toggle a sequence clip instance's Enable status is Cmd-Shift-E). A disabled clip, although present in the track, has no effect on the output.

Thanks again

Andy

Likes

translate

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 ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

Understood. There is still no state in the API.

Any reason setting the opacity (or volume, for audio track items) to 0 wouldn't work, for your use case?

Likes

translate

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
Engaged ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

Thx Bruce,  I hear you.

Re my use case, I'm not trying to set the state, I'm just trying to get it... so my script can respect it's status (and ignore the item). Ah well. Would be great if some later version of the supported (or unsupported) API could expose that property. In the meantime I'll look at using an XML export to fill in the blanks.

Andy

Likes

translate

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 ,
Dec 30, 2017 Dec 30, 2017

Copy link to clipboard

Copied

Bruce Bullis​ -- can this be voted on as well? This would be a less destructive move (instead of removing a clip), so it would be a welcome addition to the API. Also something I could use in an upcoming panel.

Likes

translate

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 ,
Dec 09, 2020 Dec 09, 2020

Copy link to clipboard

Copied

I would like to add my vote for this as well 🙂 It's more useful than lowering the opacity because just by looking at the sequence timeline we can identify which clips are visible/audible and which ones are disabled. And sometimes it's useful to keep them around even if they're disabled because they might need to be switched on later in the editing process.

Likes

translate

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 ,
Jan 13, 2021 Jan 13, 2021

Copy link to clipboard

Copied

Hi @Mau Frontier 

 

Have you considered the following workflow?

 

1.) Set opacity to 0.

2.) Change clip color

3.) Create a filter that check the opacity of a clip. If opacity is 0 && clip color = color, ignore.

 

As a side note, I've found the Automator Plus extension to be pretty useful. It allows you to copy/paste extendscript directly inside Premiere Pro and assign it to a keyboard shortcut. The developers are also very responsive and open to new feature requests.

 

Likes

translate

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 ,
Jan 13, 2021 Jan 13, 2021

Copy link to clipboard

Copied

Thanks for the suggestion @Chane5FF7 . It's an adequate workaround for some scenarios. If we're already making use of color-coding in our workflow for a different meaning, or if the clips already have opacity keyframes, this wouldn't be a proper workaround.

 

This is a small feature request and probably an unimportant one, I'm really just disappointed by the vast difference in the Extendscript API maturity between Premiere and AE, and the fact that there are so many awesome features within QE that we can't really rely on. I hope this changes in the future and we get stable endpoints for much of the functionality available in QE and more.

Likes

translate

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