2
$\begingroup$

I have 40-50 similiar objects and I'd like to animate their scale randomly in the same way but the animations should be shifted to each other. I can do it easily by linking then unlinking the animation data but then making changes is hard. The steps I made:

I made a reference object and its X and Y scale properties are animated by an F-curve with Noise and Stepped modifiers. I created the other objects and linked the Animation Data. Works beautifully but obviously the animations are exactly the same, so I'd like to change the Phase property of the Noise modifier in each objects.

Since they are linked, if I change the Phase in one object, it will change in every other curve too. If I unlink them, then I can not make any changes which should apply to every object (like changing the Scale in the Noise modifier).

I tried the Alt+click method to apply the change on every selected object but didn't work. I also tried to use "Copy to selected" but it's gray for some reason. Setting up a driver was also not possible beacuse it was grey too. all copy options are gray

It feels like that what I'm trying to do is possible, but can not find the way. What am I missing?

$\endgroup$

1 Answer 1

3
$\begingroup$

You can assign a different offset to each object's f-curve using Python, just type the below into the console (the objects must be selected):

>>> for o in C.selected_objects:
...     o.animation_data.action.fcurves[0].modifiers[0].offset = noise.random()*10
...     
>>>

Remember to hit Enter at the end until you return to the >>> prompt. Increase or decrease the 10 at the end of the 2nd line to increase or decrease the range of random values assigned to offset.

$\endgroup$
3
  • $\begingroup$ So easy. And I tried it with animation nodes and even geometry nodes…🤦🏻‍♂️knowledge is power!👍🏻 $\endgroup$
    – Chris
    Dec 7, 2021 at 13:02
  • $\begingroup$ @Chris I also took a moment to see if it can be done without Python. A vertical offset (Y axis in the graph editor) could be done by changing the modifier from replacing to adding and driving the base value based on some driver, like hashing self or something, but a horizontal offset it seems you can't affect due to how modifiers work... $\endgroup$ Dec 7, 2021 at 13:06
  • $\begingroup$ Perfect! Good to learn about the Python console, it's simple yet powerful. Thank you! $\endgroup$ Dec 7, 2021 at 18:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .