Forum Replies Created

Page 1 of 2
  • Frank Mansfield

    December 7, 2022 at 4:00 pm in reply to: Free After Effects Looping Expression Script Panel

    Hi Willhelm!

    Yep, if you select the layer or layers that you want to loop (or any keyframes on those layers) then you can create a loop expression on all of them at once.

    Hope it’s useful to you! 🙂

    -f

  • Frank Mansfield

    June 27, 2022 at 11:25 am in reply to: Zoom in on image but keeping text the same size

    If I understand correctly what you’re after (apologies if I don’t!) then the simplest way might be to create a null layer for each piece of text as a sort of locator-null.

    That way, you can parent the locator-null to the map you’re scaling up and then create an expression on the text layer position to link it to the position of the locator null (so, basically, the null will scale with the map, but you only take the position of the null layer to locate your text layer).

    You do need to convert the null position from local to world position, but just refer to the wisdom of Dan Eberts for that and you get something like…

    1) Create null layer (“locaterNull”)

    2) position the null layer where your text needs to be

    3) parent the null layer to the map you’re scaling

    4) apply this expression to the position of your text layer:

    l=thisComp.layer(“locatorNull”);

    l.toWorld(l.anchorPoint);

    Hope that helps!
    -f

  • Frank Mansfield

    March 7, 2022 at 12:13 pm in reply to: multidimensional array – simple maths stuff?

    holey moley… 🙂

    This is way above my pay-grade. I’ll be back in about 2 weeks after I’ve unpicked some of this madness!

    Thanks, Filip, that’s brilliant, cheers
    -f

  • Frank Mansfield

    March 7, 2022 at 11:56 am in reply to: multidimensional array – simple maths stuff?

    Cheers Filip – I’ll switch that out, thanks for the heads-up!

    What I was chasing up was whether there was a simpler way of subtracting/adding the multidimensional arrays together. Having to for-loop through seems a bit long-winded – I figured there might be a way of just subtracting one array from another? A sort of “sub (arr1 , arr2)” that works multi-dimensionally?

    Thanks dude!
    -f

  • Frank Mansfield

    March 7, 2022 at 11:09 am in reply to: multidimensional array – simple maths stuff?

    just realised i never included the expression as it stands, sorry!

    something like this, but without the unnecessary clunk

    if ( numKeys > 0 && time > key(numKeys).time) {
    //continue out
    keyframeTime = key(numKeys).time;
    offsetKeyframeTime = key(numKeys).time - framesToTime(1);
    framesMultiplier = timeToFrames(time - keyframeTime);
    endingPointsArray = thisProperty.points(keyframeTime);
    preEndingPointsArray = thisProperty.points(offsetKeyframeTime);
    endingInTangentsArray = thisProperty.inTangents(keyframeTime);
    preEndingInTangentsArray = thisProperty.inTangents(offsetKeyframeTime);
    endingOutTangentsArray = thisProperty.outTangents(keyframeTime);
    preEndingOutTangentsArray = thisProperty.outTangents(offsetKeyframeTime);
    pointsArray = [];
    inTangentsArray = [];
    outTangentsArray = [];
    for (i=0 ; i<endingPointsArray.length ; i++) {
    pointsArray[i] = endingPointsArray[i] + (framesMultiplier * ( endingPointsArray[i] - preEndingPointsArray[i] ));
    inTangentsArray[i] = endingInTangentsArray[i] + (framesMultiplier * ( endingInTangentsArray[i] - preEndingInTangentsArray[i] ));
    outTangentsArray[i] = endingOutTangentsArray[i] + (framesMultiplier * ( endingOutTangentsArray[i] - preEndingOutTangentsArray[i] ));
    }
    pathClosedState = thisProperty.isClosed();
    createPath( points = pointsArray , inTangents = inTangentsArray , outTangents = outTangentsArray , isClosed = pathClosedState);
    }
    else value
  • Frank Mansfield

    November 26, 2020 at 1:58 pm in reply to: Filter path property from others for looping tool

    Thanks Matt!

    I was literally trying that just last night, but came across the problem that it doesn’t bring up an error unless it’s before or after the keyframe range. Although now I come to think of it, if we’re being *really* filthy, I could just move the playhead to after the last keyframe to force the error…

    Like you say, still feels a bit hacky though. Still, I’m not painting the flippin’ mona lisa here, am I? 😉

    Cheers dude!
    -f

  • Cheers for having a bash anyway, Dave, much appreciated! 🙂

  • Hi Long

    This is probably a question for the expressions forum. I have had a bash at this, but my solution is pretty clunky and amateurish (anything even approaching real maths is way above my expression pay-grade!).

    I’ve attached the test project I was playing with for you to have a look at, but basically I put this expression on the position property of the moving layer:

    distanceValue = 200;

    basePos = transform.position;

    otherDotPos = thisComp.layer(“Shape Layer 1”).transform.position;

    distanceBetween = length(basePos, otherDotPos);

    newVector = basePos – otherDotPos;

    newSetLengthVector = ( distanceValue / distanceBetween ) * newVector;

    if ( distanceBetween <= distanceValue) otherDotPos + newSetLengthVector; else basePos;

    the “distanceValue” is how far away it stays, and “otherDotPos” is the layer it’s staying away from.

    Still might be worth a shout to the expressions forum, as people who are actually good at this stuff could probably add some damping or something to stop it having the potential to jump around so much. But for goodness sake, don’t show them my code, I’m not sure I could take the shame… 😉

    Cheers!
    -f

  • You’ve almost certainly already tried this, but it would be remiss not to double-check that you haven’t simply toggled the Source Name / Layer Name button above the layers?

    This would switch back for everything if you tried to change any one of the layer names, so this probably doesn’t help, but just on the slim off-chance that this is the solution….

  • That’s what I thought too, but nope.

    It’s repeatable in a new scene – if you create a shape then try to copy the content/Rectangle/Transform:Rectangle/Scale values to the layer’s normal scale properties then you get the same error message.

    AFX must store the values differently for some reason, I was just wondering if anyone could explain it to me!

    Cheers
    -f

Page 1 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy