FORUMS: list search recent posts

Argh! Very simple but can't get to work!! Adding values with time remapping and expressions

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jim lefevre
Argh! Very simple but can't get to work!! Adding values with time remapping and expressions
on Feb 2, 2012 at 4:53:44 pm

In my comp - COMP1 - I have 19 layers, each of exactly the same sequence of animation which is 57 frames long.

I am time remapping each layer to have a single hold keyframe on each consecutive frame so

Layer 01 - frame 01
Layer 02 - frame 02

meaning you have all the first 19 images of the animation in 19 consecutive layers in the comp.

etc...

I need to duplicate that comp to COMP02 and have a layer with a slider control that means I can change the time remapping values to add 19 to each of the layers so in effect it's the next 19 frames (the reason being is I'm going to be duplicating this comp loads of times with different offsets)

This layer is called "FRAME_OFFSET" and the slider is called "AMOUNT_OF_FRAMES". The slider value is '19'

I thought that it was as simple as having my time-remap keyframe value and then adding the slider number but when I use the pickwhip I get

timeRemap+thisComp.layer("FRAME_OFFSET").effect("AMOUNT_OF_FRAMES")("Slider")

and it's giving me ridiculous return numbers that I can't seem to work out. Basically not working at all!

Is this because my method of 'adding' is wrong - i.e. using the + sign or is it something to do with what time re-mapping considers 'a frame'

hmmmmmm

Any thoughts would be very much appreciated!


yours

jim

http://www.jimlefevre.com


Return to posts index

Dan Ebberts
Re: Argh! Very simple but can't get to work!! Adding values with time remapping and expressions
on Feb 2, 2012 at 5:23:02 pm

Time remap expects seconds, not frames. So you'll need to do something like this (not tested):

f = thisComp.layer("FRAME_OFFSET").effect("AMOUNT_OF_FRAMES")("Slider");
value + framesToTime(f)


Dan



Return to posts index

jim lefevre
Re: Argh! Very simple but can't get to work!! Adding values with time remapping and expressions
on Feb 2, 2012 at 6:56:10 pm

Ahhh... of course, I seem to remember this thing from a while back about the value of seconds and frames in the decimal returns.

Oh my goodness... it works a treat!

I know you hear it a lot but you are an absolute star Dan, thank you so much!!

I'm going to study the expression and try and properly understand it!

http://www.jimlefevre.com


Return to posts index

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