1 person found this helpful
thisComp.layer("Black Solid 1").transform.position.valueAtTime(time -.1) - [20,0];
Easy enough...for you that is! Thanks Dan!
This doesn't seem to work for Illustrator paths converted to shapes. AE sends error: "couldn't find layer named 'shape-1'" -- this seems to be because AE doesn't think of converted shapes as "layers." -- ??
Is there an expression workaround?
That expression should work fine with any type of layer. Maybe the layer's name isn't precisely 'shape-1'. Is it possible there's an extra space or dash, or a capitalization, or spelling mismatch? If you used the pickwhip you should be OK though.
Or are you trying to get at one of the groups within the shape layer? That would be a different issue.
Everything is spelled correctly. Yes, the problem seems to be that I'm trying to refer to shape groups, not proper layers. This was done by importing an Illustrator file and then creating shapes from vector layer. (Each shape gets its own "group," which apparently AE doesn't see as layers.)
This is also weird, since simple expressions, such as
work fine. I guess that's because there's no layer reference, only a reference to the shape name, "shape-1".
Is there a way for an expression to address position and time for these "non-layer" shapes?
Thanks for your help. :+)
If you wanted another layer to follow a particular group's position with a .1 second delay, you could do it like this:
L = thisComp.layer("shape-1");
L.toComp(L.content("Group 1").transform.position, time-.1)
For another group within the same shape layer, it would be like this:
content("shape-1").transform.position.valueAtTime(time-.1) - ;
Thanks MUCH. :+)