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

getting number of 3d layers in a selection

$
0
0

I've been trying variations of the follwing code -

 

var userSelection = app.project.activeItem.selectedLayers;
var num3d = [];

for (var j=0; j<userSelection.length; j++) num3d[j] = userSelection[j].threeDLayer= true;

alert (num3d.length)

 

I want to test an array of layers and execute and if else statement that alerts the user if some of the layers aren't 3d and does something else if the they are all three d layers.

 

Problem here (as far as I can gather) is that .threeDLayer = true sets the value instead of just retrieving it. I've also tried threeDLayer.value and that didn't work either.


Viewing all articles
Browse latest Browse all 2143

Trending Articles



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