Posts by amberija

30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says


FF = 10*thisComp.frameDuration;
if (time=inPoint && time<=inPoint+FF) {time-inPoint}
else if (time=outPoint && time>=outPoint-FF) {thisLayer.source.duration+time-outPoint}
Don’t you mean…
FF = 10*thisComp.frameDuration;
if (time>=inPoint && time<=inPoint+FF) {time-inPoint}
else if (time<=outPoint && time>=outPoint-FF) {thisLayer.source.duration+(time-(outPoint-FF))}

...? You used an = instead of a >= . If you did want to use an ‘equals’ it would need to be a comparative equals, i.e. == . At the moment, you’re setting time to be inPoint and then comparing it to a different value. In the above, both of your if statements will evaluate to false and the expression will always return FF. Also, shouldn’t the time to subtract from the layer source duration be the time past the outPoint- FF, not the time past the outPoint.

With my adjustment above the case where time >inPoint+FF and time <outPoint-FF isn’t really covered. (i.e. when not animating in or out). The expression will currently return the value FF. That’s probably a decent thing to return, but it’s probably good to make it explicit, with the addition of…

else FF;

True words, felt! With this thread and your help I hope I will enhance my expression! I wrote that late night, tested and it worked for me) I like your approach for that solution. But I would also to hear from you – will the length of code reduce speed in viewport. I see it, for example, in bounce expression when there are too many objects evaluated by it.

30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says



Hello folks, i want to pre-compose a composition with in-out animations. Ex: I’ve created a 30 seconds layer, I’ve put keyframes in first 10 frames and in last 10 frames. So I want to increase and decrease the layer time in a pre-composed comp just dragging out point, but keeping in-out animations. Could you help me?
Hello! What kind of animation you have? Do timeremap works for you?
Yeah, time remap could work, but i want to precompose this time remap(first 10 frames and last 10 frames), in a comp I don´t need to drag keyframes, just increase or decrease layer time.
I made it as I understood you. Now you have different in and out points for the same copies of one layer that is precomoped and “timeremaped”. Inside it has in and out animations for 10 frames. In code you see 10 – thats your in and out animations. Change it to desired number as you want to tune you animation.
FF = 10*thisComp.frameDuration;
if (time=inPoint && time<=inPoint+FF) {time-inPoint}
else if (time=outPoint && time>=outPoint-FF) {thisLayer.source.duration+time-outPoint}
30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says

Hello folks, i want to pre-compose a composition with in-out animations. Ex: I’ve created a 30 seconds layer, I’ve put keyframes in first 10 frames and in last 10 frames. So I want to increase and decrease the layer time in a pre-composed comp just dragging out point, but keeping in-out animations. Could you help me?

Hello! What kind of animation you have? Do timeremap works for you?

30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says
In your case there will be no switch. Simple as is. Put in background com. Layer Textures – timeremap this code:
x=comp("1_For_Customization").layer("Surface_Slider ").transform.xPosition/10;
framesToTime(x);
30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says

That exactly what I was looking for!!! BIG Thanks!!!

Is there a way to help me with a second “object’s x position” slider?

What I need is object x position to REPLACE A FUNCTIONAL slider used as a background selector which background frames are in another comp. So has to be step limited lets say 1 to 10 (every frame links a background choice)

This slider (used in a control panel) is a “selector” used in conjunction with this script line: state=comp(“1_For_Customization”).layer(“Controls”).effect(“Background”)(“ADBE Slider Control-0001”); framesToTime(state);

WeTransfer Link of the slider surface selector already working which I want to replace an object x 10 stepped position: http://we.tl/IcI1RdQ3DM
What you basically need is an switch function. I used it in my universal counter in infographics kit template. I needed different currency sign in suffix (dollar, euro, yen etc). Drivable by slider control. So that value on slider was: 0=no suffix, 1=dollar, 2=euro etc. switch(expression) { case n: code block break; case n: code block break; default: default code block }
30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says

Thanks for your time! I have tested your “example” but unfortunatelly I the “Arrow” layer cant be moved at all! in order to affect “shape tester” opacity!

What I did is this line for the layer affected comp(“For_Customization”).layer(“Text_Glossiness_Slider”).transform.xPosition

And this layer which x position is affecting tha above layer opacity x = clamp(position0, 0,100);

What I would like to accomplish is: 1. The x distance to be more than 100 pixels to be more “detailed” for the selection 2. If there is a way to limit the the x position “slider” to 10 steps.

Thanks
Here is the project. Hope it will help (AE CC): link
30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says

Hello Pixelit_Plus! It is hard to write it all but my image explains a lot. (I hope) Anyway, i made it and it works just fine. I made a bar length of 300px. You can see the image below and the code refercing 300. Thats the length theat represents 100% opacity. With this code it does not matter where the slider is. Link the arrow to Bar!!!

30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says


Hello guys, is it possible to set a specific time to start at a layer marker ?

For example:

time flows normally : 1s,2s,3s,4s,5s…

Then, when the time indicator reachs the marker it jumps to 30s and flows from that point: 30s,31s,32s,33s…

Is it possible ?

For this simple scenario, you only need a single line of code on the Time Remap property.

if(marker.numKeys) {time>=marker.key(1).time ? 30+(marker.key(1).time-time) : value} else value;
The ? and : part is a ternary expression and is a useful shorthand way of writing an if else statement.

Ternary expression — always wanted to know that! Thanks.

30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says



Hey, it’s me again :D i’m still stuck, how can i parent only the vertical size of a layer to the vertical size of another layer ? Thanks a lot for your help guys

On Scale:

L = thisComp.layer("whatever");
[value[0], L.transform.scale[1]];

It doesn’t work for me. As you can see, i’m trying to parent the horizontal size (not the vertical) of the layer called “Background” to the horizontal size of the “Rectangle 1” contained in the layer called “Frame”, the rectangle is parented to a slider so the client can easily slide the horizontal scale. Thanks again for your help

For horizontal size:
L = thisComp.layer("whatever");
[L.transform.scale[1]], value[0];
30 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 1
+3 more
amberija
says

Actually, on looking again, I see that’s not your problem… you already grabbed the code from somewhere else. The problem is that you’re moving the layer linearly and scaling exponentially. If you want everything to move together, you’d need to apply the exponential code to the movement too.

You where right. I have two keyframes. Position and Scale. I’m trying to make zoom to a map. Made a few project and thought of automating process for myself. So I applyed your code to scale & position both. And it was charming. Problem solved! I’m very happy because i was looking for that solution for a long time :) Thank you!

by
by
by
by
by
by