Forum Replies Created

  • Hannes Holtermann

    February 25, 2021 at 9:13 am in reply to: Auto-slide Null to position on marker

    Ah, ok. So I’m getting the offsets like this (just for anyone interested)

        currentOffset = 0;
    totalOffset = 0;
    previousOffset = 0;

    for(i=1; i < n-1; i++) {
    currentOffset = getContentHeight(i);
    totalOffset += currentOffset;
    if (i < n-2) {
    previousOffset += currentOffset;
    }
    }

    And since I want to start the ease just after the current marker time I don’t need the previous marker time.

    I’ve got it all working nicely and want to thank you a lot, Dan!

  • Hannes Holtermann

    February 25, 2021 at 1:18 am in reply to: Auto-slide Null to position on marker

    Oh wow, you’re awesome. Thanks a lot. I forgot to remove it after changing from a while loop.

    I’ve also noted that a couple of markers where off by a couple of frames resulting in a wrong calculation by sourceRectAtTime().

    One last thing: Do you know why it’s not easing the animation? It’s just a jump cut. I’d love to do a ease out for 1s. But this doesnt work

    y = ease(time, n+1, n+2, value[1], totalOffset);
    value - [0,y]
    with n being 
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (time < m.key(n).time) n--;
    }

    Muchas gracias!

  • Hannes Holtermann

    February 25, 2021 at 12:53 am in reply to: Auto-slide Null to position on marker

    Hmm, I guess that my marker detection is somewhat off because it’s only sliding up every second marker. Is looking for nearestKey the right thing to do if I want to push the content up as soon as the marker has been passed?

    Thanks a lot for your help, Dan!

  • Hannes Holtermann

    February 24, 2021 at 9:24 pm in reply to: Auto-slide Null to position on marker

    <div>So I’m getting closer but something still seems off as at some markers the calculatioin doesnt seem to fit. Can you spot something I’m missing?</div><div>

    day = "DI_";
    margin = effect("Margin")("ADBE Slider Control-0001");
    m = marker;
    transitionTime = .5;
    n = 0;
    getContentHeight = function(layerID) {
    layerID--; // exclude current layer from calculation by subtracting 1
    if(layerID > 0) {
    if(layerID < 10) {
    layer = day + "0" + layerID;
    } else {
    layer = day + layerID;
    }
    s = eval('comp("' + layer +'").layer("Programm").sourceRectAtTime();');
    return s.height + margin;
    } else {
    return 0;
    }
    }
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (time < m.key(n).time) n--;
    }
    if (n > 0){
    totalOffset = 0;
    for(i=0; i < n; i++) {
    totalOffset += getContentHeight(n);
    i++;
    }
        t = time - m.key(n).time;
    y = ease(time, n, transitionTime, value[1], totalOffset);
    value - [0,y];
    } else
    value

    </div>

  • Hannes Holtermann

    February 24, 2021 at 7:05 pm in reply to: Auto-slide Null to position on marker

    Hey Dan,

    I guess your analysis is spot on. I was thinking that there is some sort of state saving. How would you handle this? Create a recurrsive loop to sum up all previous heights? Or is there a more elegant way?

  • Hi Dan,

    thanks for your response. Quite a legend you are. 🙂

    So: I’m trying to change the value of the slider that is on the very same layer and is supposed to handle the position of the element. This is related to my other question https://creativecow.net/forums/thread/auto-slide-null-to-position-on-marker/

    The idea is to use the slider to save the current state of the offset to which I can then add another offset.

    So there’s no way for an expression to change the value of the controller even if it’s on the same layer, right? Bummers 🙁

    Would you happen to have a good reading resource on how to set this up via a script?

    Thanks!

    Auto-slide Null to position on marker

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