Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to auto rename added Null object?

  • How to auto rename added Null object?

    Posted by Tomasz Tejchman on November 30, 2011 at 10:18 am

    Hi

    i Have some problem i made parser for tracking data I’m creating dynamicly null objects (i’ve found that it colud not be named by script – there is no name property if creating null 🙁 )

    so i try to loop through elements in project and renaming last added but it doesn’t works.

    for example i make composition “tracking data” and adding to it 4 null objects i want to rename them “point 1”, “point 2”, “point 3” etc. not only layers but also objects in project.

    Dan Ebberts replied 14 years, 9 months ago 2 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    November 30, 2011 at 6:38 pm

    Just name them after you create them:

    var myComp = app.project.activeItem;
    var myNull = myComp.layers.addNull(myComp.duration);
    myNull.name = “point 1”;

    Dan

  • Tomasz Tejchman

    December 1, 2011 at 10:35 am

    actually i doesn’t works 🙁 it seems that there is no “name” parameter or method

    there is no error message just nothing happens

  • Dan Ebberts

    December 1, 2011 at 3:33 pm

    Are you possibly looking at the Source Name instead of the Layer Name?

    Dan

  • Tomasz Tejchman

    December 1, 2011 at 4:03 pm

    yeah finally it works 🙂

    just need to change myNull.name to myNull.source.name

  • Tomasz Tejchman

    December 1, 2011 at 4:03 pm

    thanks for helping 😀

  • Dan Ebberts

    December 1, 2011 at 4:18 pm

    Well, that’s certainly one way to do it. myNull.name should work though. If you toggle the timeline to display layer names instead of source names (by clicking on “Source Name”) you should see it. I apologize if you already knew this.

    Dan

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