FORUMS: list search recent posts

Expression code to test if layer has Collapse Transformations / Continuously Rasterize switched on or off

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrew Saunders
Expression code to test if layer has Collapse Transformations / Continuously Rasterize switched on or off
on Apr 8, 2018 at 4:03:42 pm

I am wondering if expressions can access a layer's Collapse Transformations / Continuously Rasterize state. I am currently writing an expression that acts on a Distort->Transform effect on the layer.

The expression uses the sourceRectAtTime property to shift the contents of the layer to the layer edges. This all works fine, rasterize or not, when the scale and rotation properties of the layer are left at their initial values. However, if those change, to keep the effect working the same once 'continuously rasterize' has been turned on, the sourceRectAtTime values must be converted to composition space values (via toComp function.).. but of course plugging that hole then means the expression doesn't work with continuously rasterize turned off (which relies on layer space values!)

I was hoping this could be rectified by first testing for the layer's 'continuously rasterize' state and then routing the expression one way or the other to either convert for composition space or remain with layer space.


Return to posts index

Kalleheikki Kannisto
Re: Expression code to test if layer has Collapse Transformations / Continuously Rasterize switched on or off
on Apr 13, 2018 at 5:33:51 pm

Not to my knowledge. How about adding a checkbox expression control to indicate whether collapse transformations switch is on or off? That value you can check with an expression.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Steve Bentley
Re: Expression code to test if layer has Collapse Transformations / Continuously Rasterize switched on or off
on Apr 13, 2018 at 5:47:08 pm

Ok I'll bite. If we can't access the CR state from an expression, can we really control the CR state from a check box? Wouldn't that by its very nature require an expression?
Is there a trick?



Return to posts index


Andrew Saunders
Re: Expression code to test if layer has Collapse Transformations / Continuously Rasterize switched on or off
on Apr 13, 2018 at 6:23:23 pm

What I've ended up doing is as Kalleheikki suggests - using a checkbox effect which at least provides a means by which a user can specify whether the preset should assume the layer is in CR state or not. As Steve points out, having that checkbox doesn't actually change the the CR state itself. So in order for the preset to work the user must manually make sure the checkbox state matches the layer's CR state. It's a hack but it's the best option assuming there is no way for an expression to check the CR state directly...


Return to posts index

Kalleheikki Kannisto
Re: Expression code to test if layer has Collapse Transformations / Continuously Rasterize switched on or off
on Apr 14, 2018 at 8:02:50 am

You're right, the idea is that you give the user an easier way to control which expression to use, rather than having to copy and paste expressions depending on CR state you click two boxes instead of one. I don't believe you can automate this further with expressions. Maybe script, but not really familiar with that side of things in AE.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]