-
Expression code to test if layer has Collapse Transformations / Continuously Rasterize switched on or off
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.