I'm currently building a logo lock up that includes three shape layers: client logo, a plus (+) symbol, and vendor logo. I need all three shape layers to be centered horizontally in the canvas.
The catch is that this needs to be a template so that the client logo can be replaced and everything will center automatically again. Could this be achieved with multiple compositions and layer masks? Thoughts?
Im not sure what your problem is. What i would do in this case are 2 other comps in which i put the logos. Inside them i would put a guide layer(a circle or a square) and write somthing like "Please fit your logo inside these shape" and make this text layer also guide layer. This way, you guide them, but these guides don;t show up on render.
to have this as a working template, you need to do the following:
1. Link layers to a null, which will affect all positioning.
2. Get each of the layers's widths. Since they can be shapes, use sourceRectAtTime().
3. Add scale value into width estimation if it is altered from original size.
4. Calculate the center point of all layers widths including gaps in between in relation to comps size.
1. Make sure that client's logo anchor is right aligned.
2. Plus symbol - center aligned.
3. Vendor asset - left aligned.
In such case, the gaps will always remain the same, just X shift will adjust. I have this in mind, but if you hit a wall just drop a note.