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

remove selected properties from ShapeLayer

$
0
0

This seems so simple, but I cannot figure this out.

 

I have selected Stroke and Fill under ShapeLayer. And I want to remove them from this layer.

 

    var myLayer = myComp.selectedLayers[0];

    var propertyCollection = myLayer.selectedProperties;

 

 

    for (var j = propertyCollection.length-1; j >= 0; j --) {

        propertyCollection[j].remove()

    }

 

However, on second iteration AE gives me error "Object is invalid". Am I missing something?

P.S. How do I paste code here so it looks like a code, and not a text?


Viewing all articles
Browse latest Browse all 2143

Latest Images

Trending Articles



Latest Images

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