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

Help with Ft Toolbar script enhancing

Explorer ,
Apr 27, 2017 Apr 27, 2017

Hi there

I have the script in Ft Toolbar which reveals selected layer in Project panel. It works well but the Project panel has to be opened. If I click the script-button in Ft Toolbar and the Project panel is opened but invisible (hidden by some other panel), it does not work. I have to activate the Project panel, cllick on the layer in Composition panel and then Ft Toolbar script-button works.

If I do R-click on the layer > Reveal Composition in Project, it opens the Project panel even in the case it is covered by some other panel. So there is the way.

Do you have any idea how to enhance this script?

var proj = app.project;

var comp = proj.activeItem;

if(comp){

  var selectedLayers = comp.selectedLayers;

  if(selectedLayers.length > 0){

  if (app.project.selection !=null)

for (i = app.project.selection.length-1; i >= 0; i--)

app.project.selection.selected = false;

  for(var l = 0 ; l < selectedLayers.length ; l++){

  selectedLayers.source.selected = true;

  }

  }

}

Thank you in advance.

TOPICS
Scripting
1.0K
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 , May 02, 2017 May 02, 2017

Try this:

app.project.showWindow(true);

Dan

Translate
Community Expert ,
May 02, 2017 May 02, 2017

Try this:

app.project.showWindow(true);

Dan

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 ,
May 02, 2017 May 02, 2017
LATEST

Dear Dan, you are my hero. Every time I save a click, I will say a Thank 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