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

Remove all Guides - AE Scripting

Participant ,
Jun 26, 2022 Jun 26, 2022

Does anyone have any tips on how to remove all guides in the script?

 

app.project.item(index).removeGuide(guideIndex)

 

What should be in the parentheses to remove multiple guides at once.

Who I use for loop for example

 

for (i = 0; i < 250; i++){
comp.removeGuide(i);
}

It removes guides but in some weird groups so I need to click multiple times to be able to delate all of them.

Thank you in advance.

TOPICS
Scripting
966
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

Community Expert , Jun 26, 2022 Jun 26, 2022

if you do

comp.removeGuide(0);

instantly after that call, guide 1 becomes guide 0.

Hence, if you do

comp.removeGuide(1);

after that, you miss the guide, which has just become guide 0

 

try something like

var num = comp.guides.length;

for (i = 0; i < num; i++){
comp.removeGuide(0);
}

Translate
Community Expert ,
Jun 26, 2022 Jun 26, 2022

if you do

comp.removeGuide(0);

instantly after that call, guide 1 becomes guide 0.

Hence, if you do

comp.removeGuide(1);

after that, you miss the guide, which has just become guide 0

 

try something like

var num = comp.guides.length;

for (i = 0; i < num; i++){
comp.removeGuide(0);
}

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
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
Participant ,
Jun 26, 2022 Jun 26, 2022

That is great. Thank you so much, Mathias.

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 ,
Jun 26, 2022 Jun 26, 2022

... and by the way, if you use Automation Blocks, you don't even need a loop to remove all guides:Screenshot 2022-06-26 at 20.43.20.png

 

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
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
Participant ,
Jun 26, 2022 Jun 26, 2022
LATEST

Automation Blocks is a wonderful tool. Thank you again, Mathias.

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