Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions get name of puppet pin?

  • get name of puppet pin?

    Posted by Greg Digenti on March 6, 2011 at 10:02 pm

    I’m linking the position of a lot of puppet pins to corresponding nulls, and I’ve renamed each of the puppet pins to match the name of the null that I want to attach them to. I was thinking that if I just get the name of the current puppet pin, it would make the whole process so much easier, because then the code wouldn’t have to change for each puppet pin that I added it to.

    I know I can get the name of the current comp and the current layer, is it possible to get the name of the puppet pin?

    Nate Vander plas replied 15 years, 1 month ago 3 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    March 6, 2011 at 10:32 pm

    What do you mean by “current puppet pin”? You can get the name of the first pin (highest in the stack, not necessarily Pin 1) like this:

    thisComp.layer(“puppet layer”).effect(“Puppet”)(“arap”)(“Mesh”)(“Mesh 1”)(“Deform”)(1).name

    Dan

  • Greg Digenti

    March 7, 2011 at 1:21 am

    By “current pin” I meant the pin that the expression is attached to. Like if you add the expression “thisLayer.name” to the Source Text modifier of a text layer, the text will change to the name of the current layer, or the layer that the expression is within.

    See, I have many layers in a comp, each layer has multiple pins on them, and each pin has an expression that links them to a null. Each null has been renamed so it matches the name of the pin that will link to it.

    The expression on each pin is currently this:

    Z = thisComp.layer(“name of null”);
    fromWorld(Z.toWorld(Z.anchorPoint));

    But I have to change “name of null” to the name of the null that the pin should link to. I was thinking that if I could get the name of the current pin, every single pin in the comp could have the same expression.

  • Dan Ebberts

    March 7, 2011 at 1:36 am

    Ah, OK. This should do it:

    Z = thisComp.layer(thisProperty.propertyGroup(1).name);
    fromWorld(Z.toWorld(Z.anchorPoint));

    Dan

  • Greg Digenti

    March 7, 2011 at 4:01 am

    Wow, perfect. Thanks Dan!

  • Nate Vander plas

    March 24, 2011 at 7:26 pm

    If you’re looking for a REALLY easy way to attach puppet pins to nulls, check out this script:
    https://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=2229522

    Huge time saver for me!

    Nate

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