Hi there! SUPER beginner here trying to piece this together for a work project (my usual job is not motion graphics, and I haven’t used AE since 2009-ish, and it was for simple titles!). Thank you in advance for your patience.
Dan, your code is clear. I have two questions:
First, a very basic/stupid question: I have about 60 small layers/objects I’m animating, and I have their motion paths defined. I’d like to add in this color randomization for part of the animation. So question one is: Where do I put this code? Does it need to be placed on each layer?
Second, I’m testing it on one layer and I’m getting an error both in legacy and in javascript expressions engine. The two (different ) error screenshots are below. Any ideas?
– Legacy: 14272_screenshot20200817at12.58.44pm.png.zip
– Javascript: 14273_screenshot20200817at12.59.02pm.png.zip
Thank you so much for your help!
colors = [60,64,131,255]/255,
[45,162,213,255]/255,
[130,191,156,255]/255,
[221,222,226,255]/255];
easeTime = .2;
minDur = 1.5;
maxDur = 2.5;
seedRandom(index,true);
segDur = random(minDur,maxDur);
curSeg = Math.floor(time/segDur);
t = time%segDur;
seedRandom(curSeg,true);
idx1 = Math.floor(random(colors.length));
seedRandom(curSeg-1,true);
idx0 = Math.floor(random(colors.length));
ease(t,0,easeTime,colors[idx0],colors[idx1])