Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Stroke width expression?

  • Dan Ebberts

    September 26, 2017 at 11:17 pm

    It should work fine like this unless you let the layer’s x scale get set to zero somehow:

    s = transform.scale[0];
    scaleFactor = 100/s;
    value*scaleFactor;

    Dan

  • Julie Mullins

    September 26, 2017 at 11:44 pm

    I found out it was because my stroke was set to 4, it doesn’t work for a stroke that’s set to anything below 5. I don’t know why?

  • Dan Ebberts

    September 26, 2017 at 11:55 pm

    It should. What’s the scale?

    Dan

  • Julie Mullins

    September 27, 2017 at 12:32 am

    Actually that may not be the problem. Initially I was trying to do this on a layer that was brought in from Illustrator and converted to a shape layer. When it started “working” was when I created a new shape layer and had put the stroke width in as 5.
    The layer from illustrator has multiple Groups in it. Maybe that has to do with it?

  • Dan Ebberts

    September 27, 2017 at 12:42 am

    Hard to say without seeing it.

    Dan

  • Julie Mullins

    September 27, 2017 at 12:43 am

    When I delete groups from a shape layer so there’s only one, it works. I get a Line 0 error, but it works when I preview it. Is there a way for me to do this on a layer with multiple groups in it?

  • Julie Mullins

    September 27, 2017 at 12:57 am

    Sorry for the multiple replies. I applied it to every Group in the layer and get both those error message. BUT I prerendered it and it seems to work fine. I don’t get it, but at least it’s working!

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