change start frame of an looped animation

  • #1, by LebosteinTuesday, 03. February 2015, 13:09 10 years ago
    I have a sequence of frame files (0-40). I want to loop these frames in an animation. But the start frame should be number 20. How I can do that? Is it possible to "rotate" the place of all frames with an offset of 20? Or can I set a start frame of an animation in Visionaire?

    I have some sequences in that format. I can not renumber all these sequences, but this is a fixed output of an animation tool. And drag/drop of each single frame is not that, what I want. Thanks for hints.

    Key Killer

    621 Posts


  • #2, by afrlmeTuesday, 03. February 2015, 14:03 10 years ago
    it wouldn't be hard to rename them. Go to file folder > shift select all frames from frame 20 to the last frame & then right click on frame 20 > rename them by deleting the current prefix from the end & replacing with _(0) then press enter. Do the same for frames 0 to 19 but add the next number into the prefix on the end then press enter. Now select all & rename them back to what they were before.

    The whole process should take you maybe 1 minute or less.

    Alternatively drag the frames in the editor, 1 at a time.

    There's also the option of using Lua script to force the frames but it doesn't exactly start from the frame you specify as it forces the animation to only play between the frames you declare. I suppose on animation play you could force the frame to jump to frame 20 & then at the end of the animation you could reset the first frame back to the actual first frame of the loop.

    Either way, each method will take a short while to sort out, so it's up to you which you use.

    inside of an execute a script action in at begin of scene action (animation has to be active (playing or preloaded as soon as soon is opened)
    ActiveAnimations["animation_name"].AnimationFirstFrame = 20
    

    Now edit the last frame of the animation & open up the actions menu & create an execute a script action part containing...
    ActiveAnimations["animation_name"].AnimationFirstFrame = 1
    

    ...remember that "animation_name" should be replaced with actual name of the animation. Also the names are case sensitive.

    Quick note: in Lua the first frame is always 1. So in this case: frame 0 will be 1 & frame 40 will be 41.

    Imperator

    7278 Posts