Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects › Expression code to test if layer has Collapse Transformations / Continuously Rasterize switched on or off

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

    Posted by Andrew Saunders on April 8, 2018 at 4:03 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.

    Kalleheikki Kannisto replied 8 years, 5 months ago 3 Members · 4 Replies
  • 4 Replies
  • Kalleheikki Kannisto

    April 13, 2018 at 5:33 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

  • Steve Bentley

    April 13, 2018 at 5:47 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?

  • Andrew Saunders

    April 13, 2018 at 6: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…

  • Kalleheikki Kannisto

    April 14, 2018 at 8:02 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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy