|
| align layer with different size |
 |
Wed, 20 Feb 2008 04:37:01 -080 |
need help!
have to distribute a real bunch of layers in one composition, align works fine
with layer of same size but unfortunatly i have to use sd and hd layer.
i´am serching for a feature like distribute space (in this case 0) in
illustrator? is it possible with an expression/ script?
has someone an idea?
|
| Post Reply
|
| Re: align layer with different size |
 |
Wed, 20 Feb 2008 06:28:02 -080 |
Are you trying to distribute in 3D space?
The align tool compensates for width and height. IOW, if you align top then the
top edge of each layer, no matter the size, will be in line.
The distribute tool also works with edges. IOW, if you distribute top, then the
top edge of each layer will be evenly distributed between all layers.
I guess I don't understand what you're trying to do. Are you trying to get the
same space between layers? I'm guessing that you want to line up each layer so
that there is a uniform space between the layers. For example, the left edge of
each layer is 10 pixels from the right layer of the next.
If that's what you want to do then this expression should work
os = 10; //space between layers
pl = index -1;// gets layer above name
ip = thisComp.layer(pl).position[0]; //layer above x value
pw = thisComp.layer(pl).width/2; // half layer above width
w = width/2; //half this layer width
x = os + ip + pw + w;
[x, value[1]]
|
| Post Reply
|
| Re: align layer with different size |
 |
Wed, 20 Feb 2008 06:59:34 -080 |
hi rick, thank you - it works. i have changed it for y and everything is ok.
os = 0; //space between layers
pl = index -1;// gets layer above name
ip = thisComp.layer(pl).position[1]; //layer above y value
pw = thisComp.layer(pl).height/2; // half layer above height
w = height/2; //half this layer height
y = os + ip + pw + w;
[value[0],y]
|
| Post Reply
|
|
|
|
|
|
|
|
|
|