Alex Printz
Forum Replies Created
-
Alex Printz
December 6, 2019 at 3:39 pm in reply to: Global time variable in time remapped compositions‘time’ is not really a global attribute that is the same across all comps; time is the attribute to which frame the playhead is on in the current comp.
If you nest a comp, it’s always dependent on where the playhead is in the the main comp relative to it’s own inPoint and where the footage is trimmed.
A potential hack-y workaround I can see is to make the nested comp look to the the parent comp, look for the layer that is itself inside that parent comp, and then search frame-by-frame forward through keyframes on a timeRemap on itself and compare until the timeRemap value is equal to it’s current time, and then you can grab that keyframe’s time in the parent comp. This will only work if you never repeat timeRemap values; you could try to filter by inPoints as well, but it might be a mess.
something like this for the hacky code inside the nested comp (not tested):var targetComp = comp("parentComp");
var targetLayer = targetComp.layer(thisComp.name);var i = timeToFrames(targetLayer.inPoint)
while(true){
if (i == timeToFrames(targetLayer.outPoint) || i == timeToFrames(targetComp.duration)){ i=0; break;} //runs out of timeRemap;
if (time == targetLayer.timeRemap.valueAtTime(framesToTime(i))) break; //finds the corresponding time
i++; //else
}parentGlobalTime = framesToTime(i);
Alex Printz
Mograph Designer -
try this
thisComp.layer("targetLayer") .....Alex Printz
Mograph Designer -
What makes you think these aren’t individual assets? Do you have animation examples showing they’re repeaters, or are you just thinking you can make it work with a repeater? All I see are graphic design images, which would likely be unique assets or a blend effect in illustrator.
Alex Printz
Mograph Designer -
try it like this:
valueAtTime(linear(A,0,100,key(1).time,key(2).time))Alex Printz
Mograph Designer -
I don’t believe there is a way to do this with expressions, and I cannot think of a script/plugin that does this. Your best bet might be to do it in Illustrator as the styles you want, and link the AI files inside of AE. Just updated the AI files, and it should update in AE. Mask appropriately.
Alex Printz
Mograph Designer -
I frequently do something like this:
That way I can keyframe all of the points I want, and later just animate a slider from 0-100 to scrub through all of the keyed states.
s = effect("Slider 1")(1);
valueAtTime(linear( s, 0, 100, key(1).time , key(numKeys).time ) );Alex Printz
Mograph Designer -
Try this
p = thisLayer;
s = [1,1];
while (true){
if( ! p.hasParent) break;
p = p.parent;
for(i=0;i<p.scale.value.length;i++) s[i] *= p.scale[i]/100;
}
for(i=0;i<p.scale.value.length;i++) s[i] = value[i] / s[i];
sAlex Printz
Mograph Designer -
I butchered that last post.
rate = 1/0.05;
posterizeTime(rate);var letters = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N"]
serial = String(letters[random(0, letters.length-1)]);
for(i=1;i<=8;i++) serial = serial + String(Math.floor(random(0,9)));
serial
Alex Printz
Mograph Designer -
could do a for loop, clean up some of the redundant variables. Also length will always be 1 longer than the final array cell, so you need to subtract one (first cell is always cell[0]).Alex Printz
Mograph Designer -
Are you trying to snap on center (or anchorpoint) of your item layer or are you trying to snap outer edges, inner edges, etc.?
How are you going to stack checkboxes for more than one position? Does the first, or last, overpower the others?
How are you going to define the limit distances?
This is all do-able, but without more constraints it’s tough to know where to go.
Alex Printz
Mograph Designer