Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Help with Ft Toolbar script enhancing

$
0
0

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[i].selected = false;

 

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

  selectedLayers[l].source.selected = true;

  }

  }

}

 

Thank you in advance.


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>