Forum Replies Created

Page 17 of 17
  • Andy Engelkemier

    July 15, 2009 at 12:19 pm in reply to: time remap: need to know how to do it Right

    wow, that really sucks. If most people are doing that you’d think they would change the way it works, or write a script to do in an alternate way.
    I wonder if it can be done fairly easy with an expression. That way you could create an animation preset for it maybe?
    I’m not sure how to write a script that would do that. It would basically need to say, @ last keyframe value – 1 frame.
    I could get the value – 1 frame part I’m sure, but don’t know how to not run the script until the last keyframe.

  • Andy Engelkemier

    June 23, 2009 at 1:26 pm in reply to: get nearestKey’s time? I think…

    ooops, only one more problem.
    I had to edit one line to this:
    if (time > (tLim + thisLayer.timeRemap.key(1).time)){

    so that if I moved the layer it didn’t just stop the effect completely after however many seconds. I thought to myself, “hmmm, I bet that 8 seconds is no relative to my layer.” Tested it out, and sure enough.

    Once that was updated, it was all good.

  • Andy Engelkemier

    June 23, 2009 at 1:08 pm in reply to: get nearestKey’s time? I think…

    Got it….
    should I have mentioned I have cs4? They must have changed some of the global variables. It doesn’t seem you can use “t” for time and you actually have to type out “time” now.

    The time goes fairly slow until it hits 8, 7 was enough, but I wanted just a little flexibility in case I made a slight change to some of the other settings, then it just zips to the end. Exactly what I needed. That will save me quite a bit of render time.

    I thought I’d have to precompose that and do a timeremap or something to extend the time.

  • Andy Engelkemier

    June 23, 2009 at 12:22 pm in reply to: get nearestKey’s time? I think…

    Is there a way to see what the actual errors are? The help file sounds like you are suppose to just click on the triangle-exclamation, but it’s not showing me anything.
    I tried first and noticed there was an error. But then I noticed I put tLim and then timLim for the same variable (that’s what i get for copying and pasting). I’m still getting an error after fixing that though.

    I tried the code below, but I’m getting an error.

  • Andy Engelkemier

    June 22, 2009 at 7:50 pm in reply to: get nearestKey’s time? I think…

    It doesn’t have the cool catches like you had, but I don’t like to use those things until I understand what they are doing. I’d like to learn this stuff, but I’ve never been very good at programming….mostly because I don’t really know the math well. I need to find a book with just lots of small short examples of different math types that aren’t just related to database programming. If you know of a good suggestion, I’d put down a few bills for something that will help me out a bit.

    About the script: I just added a null object with a few slider controls so I could make some subtle changes to all of these. Right now I have 8 layers with this script as a test to show my coworker (the client in this case). I wanted a bit of randomness in a short amount of time. In other words, I didn’t want to try and figure out where I could put some random numbers because I don’t really know how those work with the min and max, or where I would even put them. I would guess I want the sin wave to start in different locations, but don’t know how to do that.
    It was ok though because simply moving the layers around just a little bit, I wanted them to start offset a bit anyway, created enough randomness that it looked ok.

    As you can see, I really didn’t change the pendulum expression much. I added some controllers, and created a variable in place of time to get time to start at the first keyframe. although, is that Really the second keyframe? I tried zero, but didn’t get good results. I’d like to know if 1 is actually the second of 2 keyframes though.

  • Andy Engelkemier

    June 22, 2009 at 6:18 pm in reply to: get nearestKey’s time? I think…

    I didn’t even think to include a catch for no keyframes, or if the keyframes were before the inPoint. I don’t know much programming, so I’m not sure what thinks like i++ are. I did gather the key(i).time part though. I just had some of the stynax wrong I guess. I’m not good at figuring out what order to put things in.

    Also, with the pendulum code….is there a way to make it faster? Because, wow that is slow. Should I be making some code that says once the value is below a certain point, just to hold the last value? Usually when the image stops moving it renders really fast. But with that expression it will never hit zero, so has to calculate every frame. That’s why it’s so slow, right?

Page 17 of 17

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