FORUMS: list search recent posts

How to auto rename added Null object?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tomasz Tejchman
How to auto rename added Null object?
on Nov 30, 2011 at 10:18:26 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.


Return to posts index

Dan Ebberts
Re: How to auto rename added Null object?
on Nov 30, 2011 at 6:38:17 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



Return to posts index

Tomasz Tejchman
Re: How to auto rename added Null object?
on Dec 1, 2011 at 10:35:41 am

actually i doesn't works :( it seems that there is no "name" parameter or method

there is no error message just nothing happens


Return to posts index


Dan Ebberts
Re: How to auto rename added Null object?
on Dec 1, 2011 at 3:33:11 pm

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

Dan



Return to posts index

Tomasz Tejchman
Re: How to auto rename added Null object?
on Dec 1, 2011 at 4:03:14 pm

yeah finally it works :)

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


Return to posts index

Dan Ebberts
Re: How to auto rename added Null object?
on Dec 1, 2011 at 4:18:59 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



Return to posts index


Tomasz Tejchman
Re: How to auto rename added Null object?
on Dec 1, 2011 at 4:03:37 pm

thanks for helping :D


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]