Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: layer.translate() making layer disappear

$
0
0

Well, it's it's complex that it's part of 1000+lines script/solution where I'm buiding a texture map of a bunch of layers. So I was mostly hoping if someone had ran into it before. But I tried to reduce ot bare essentials and got the same effect with linked PSD and script below. So when I run it, all layers but #1 will disappear.

 

https://www.dropbox.com/s/fxhekp86ctfbp82/translate.psd

 

var HEIGHT = 5

app.preferences.rulerUnits = Units.PIXELS

 

var doc = app.activeDocument

for (var i=0; i < doc.artLayers.length; i++) {

    var layer = doc.artLayers[i]

    doc.activeLayer = layer

    doc.resizeCanvas (doc.width, doc.height + HEIGHT, AnchorPosition.BOTTOMCENTER)

    layer.translate(0, -HEIGHT)

}


Viewing all articles
Browse latest Browse all 27456

Trending Articles



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