Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Batch change parent layer name to a different one

  • Batch change parent layer name to a different one

    Posted by Marcin Staszewski on July 2, 2014 at 12:34 pm

    Hi!
    I have multiple properties of my Element layer parented to a 3D null. I duplicated the Element layer and wanted to parent it quickly to another null. Seems like a very basic task but I started to wonder if there’s any easier way than manually changing parent layer name in every expression in my layer (or dragging the pickwhip which is even worse in this case).
    Best solution that comes to my mind is some sort of batch rename script that changes a specific phrase into another one…?

    Marcin Staszewski replied 11 years, 11 months ago 3 Members · 3 Replies
  • 3 Replies
  • George Goodman

    July 2, 2014 at 1:45 pm

    Interesting idea. Sorry to say I haven’t heard of one, maybe someone else has though.

    This goes along the lines of something I’ve requested a couple of times, that, if you feel so inclined, could also 🙂

    I really want an expression null that each layer evaluates independently. You could just parent layers to it and they would all read it as if it were on their own layer. This way, if it was wiggle, they wouldn’t all move the same way, or if it was referenced a layers index, they would act appropriately. I don’t know the full extent of your situation, but hypothetically you could update one expression and it would all be fixed (or maybe 3 expressions since you said it was for multiple properties – assuming they don’t all have different variables).

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

  • Kevin Camp

    July 2, 2014 at 9:06 pm

    this may work for you…

    add a layer control effect to the Element layer, then link your expressions to the layer control rather than the actual layer that you want them to use.

    then you can select which layer to use ans the expression ‘parent’ from the layer control. if you duplicate that Element layer, you can use the layer control to select a new ‘parent’

    ex: add a layer control effect to a layer, then add this expression to the position property of that layer:
    target = effect("Layer Control")("Layer");
    target.position

    if you set the layer control ‘layer’ property to another layer in you comp the layer swill take that selected layer’s position property…. select a different layer from the list box and it will take that layer’s position.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Marcin Staszewski

    July 14, 2014 at 4:17 pm

    Thanks a lot!
    It worked exactly as you described! 🙂

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