ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Get Values from Layers Name

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sebastian Martinez
Get Values from Layers Name
on May 9, 2020 at 2:55:30 pm

Dear expression heroes,

I'm using expressions regulary but I can't wrap my brain around this and I already searched the forum without any results:

I have a comp with a length of 1000 frames.

Within this comp is a Shape-Layer named 09:00_0010_0990.

I want to reveal the path by trimming the End-Value from frame 10 (0%) to frame 990 (100%).

How can I target the last two digits in the layer name (0010 and 0990) for this instead setting keyframes?

The hour at the beginning of the layer's name has a structural importance for the project's structure but is irrelevant for the animation itself.

Thank you in advance if there is any solution!
Sebastian

Sebastian Martinez
CGI-Designer
Cologne, Germany
AE, AI, PS, 3ds max, C4d


Return to posts index

Dan Ebberts
Re: Get Values from Layers Name
on May 9, 2020 at 3:56:44 pm

Probably something close to this:

splitName = name.split("_");
tStart = framesToTime(parseInt(splitName[1],10));
tEnd = framesToTime(parseInt(splitName[2],10));
linear(time,tStart,tEnd,0,100)


Dan



Return to posts index

Sebastian Martinez
Re: Get Values from Layers Name
on May 9, 2020 at 4:05:04 pm

Dan,

that's exactly it! Perfect, you are magic!

Dearest respacts and thank you so much again!
Sebastian

Sebastian Martinez
CGI-Designer
Cologne, Germany
AE, AI, PS, 3ds max, C4d


Return to posts index

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