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

Extendscript: remove all blank spaces in a sequence

Explorer ,
Oct 23, 2020 Oct 23, 2020

Is there a way to bulk remove all gaps between clips in a sequence? I'm currently removing them with the inRipple parameter set, i.e., removing them individually between clip removals. My assumption is gap removal increases triangularly (i.e., (n^2 - n) / 2), and so it becomes very slow on 1000+ clips. Is there a way to bulk remove gaps, to solve that problem so I only ripple remove once?

TOPICS
SDK
1.5K
Translate
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 , Oct 26, 2020 Oct 26, 2020

Sorry,, there's no "remove all gaps at once" functionality available. 

Translate
Community Expert ,
Oct 23, 2020 Oct 23, 2020

This method is without a script.

https://www.youtube.com/watch?v=I89jYuZYvP8

In this Video Tutorial i will show you how to delete multiple Gaps in Premiere Pro
Translate
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 ,
Oct 23, 2020 Oct 23, 2020

Hey Ann,

Unfortunately this is for a plugin so I need to automate it!

Translate
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 Expert ,
Oct 23, 2020 Oct 23, 2020

Does going to the Sequence menu and pull down to "Close Gap" not do it for you?

Translate
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 ,
Oct 23, 2020 Oct 23, 2020

Thanks gerikp, I don't think I was clear in asking my question - I need to remove all of it programmatically as part of a script 🙂

Translate
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 Expert ,
Oct 23, 2020 Oct 23, 2020
Translate
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 ,
Oct 25, 2020 Oct 25, 2020

Tried a few things, but really it looks like the issue is in the implementation of Track.remove(). Seems that it is superlinear wrt the number of tracks. For 2n tracks, Track.remove seems to take ~4t time. So I'm guessing the function is O(n^2), which kinda sucks when I know how fast bulk track removal is. Would there be a way to request a bulk track removal feature?

Translate
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 ,
Oct 25, 2020 Oct 25, 2020

Just to clarify the end of that comment, I mean bulk removal in the UI being very fast, and to request a bulk track removal function in the API for ExtendScript. My current solution is to recreate the sequence, which is itself not a great solution (loses the current time indicator, zooms the track out to default, etc)

Translate
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 ,
Oct 26, 2020 Oct 26, 2020

Sorry,, there's no "remove all gaps at once" functionality available. 

Translate
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 ,
Oct 26, 2020 Oct 26, 2020

Understood. Could I request a bulk clip remove function? Ie specify an array of either  project item node ids or the clip node ids, and remove them all at once? Inidividually removing many clips is very slow!

Translate
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 ,
Oct 26, 2020 Oct 26, 2020
LATEST

You could request such a feature, but I think it'd be better for us to fix the root cause of the API slowness (which you're not the first to report, under PPro's New World scripting). 

 

Translate
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