• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Delaying animation with expression controls instead of keyframes

Community Beginner ,
May 16, 2024 May 16, 2024

Copy link to clipboard

Copied

Hello,
To get a slight delay in my animation on each duplicated groups, i made this simple expression on a trim path :

i=(thisProperty.propertyGroup(2).propertyGroup(1).propertyIndex)-1;
value + valueAtTime(time+i/10)

 

But i just want only one set of keyframes to control every groups. 

if i replace the "value" by a slider control for example, the delay no longer works. I don't know why.

Any idea? Thanks

TOPICS
Error or problem , Expressions , Scripting

Views

204

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 16, 2024 May 16, 2024

Copy link to clipboard

Copied

Posting a screen capture of your timeline would help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 17, 2024 May 17, 2024

Copy link to clipboard

Copied

there it is

Annotation 2024-05-17 090145.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2024 May 17, 2024

Copy link to clipboard

Copied

I think it will be something like this:

delay = .1;
n = thisProperty.propertyGroup(4).numProperties;
myIndex = thisProperty.propertyGroup(3).propertyIndex;
diff = n - myIndex;
myDelay = diff*delay;
s = effect("Slider Control")("Slider");
s.valueAtTime(time - myDelay)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2024 May 17, 2024

Copy link to clipboard

Copied

LATEST

If you wanted it to go top to bottom (instead of bottom to top), it would be like this:

delay = .1;
myIndex = thisProperty.propertyGroup(3).propertyIndex;
myDelay = (myIndex-1)*delay;
s = effect("Slider Control")("Slider");
s.valueAtTime(time - myDelay)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 16, 2024 May 16, 2024

Copy link to clipboard

Copied

Why would you replace the "value" with the slider? This makes no sense. You need to manipulate the time inside the valueAtTime() function. Of course you may need a ton of extra code with linear() functions if you need exact values instead of the oens the function gives you, but I think you simply misunderstand the basics.

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 17, 2024 May 17, 2024

Copy link to clipboard

Copied

Because i want to duplicate the animation on a great amount of sub groups and be able to edit theire animation interpolation with 2 keyframes instead of hundreds. the linear doesn't give me this flexibility of editing though.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines