Loop Drawings automatically

Hi,

some updating.

Harmony has the feature “create cycle” which is similar to the SetLoop-script. Either in the option in the meny or in the paste special window. I would guess what we are looking for is a more easy and faster way to do this. since loops often i common used. I guess there are several things you can do to make the work flexible but sometimes it could get more complex than needed of course.

  1. I have made a screenrecording from what I mentioned earlier.
  • If I have a layer with a short loop and the last frame is a hold for several frames. If I loop that with SetLoop the frames will loop once.
  • If I have a layer with only the short loop and then there are empty frames and I copy the loop from the first empty frame the frames will be looped until end of project.

You can see the screenrecording here:
https://www.dropbox.com/s/snv1dhwrjfgcsas/SetLoop_test1.mp4?dl=0

Dont know if this is a scripting issue

  1. An option that you could add to the script would be “random”. to loop the frames in random.

  2. Another feature I was thinking about was if you could choose a last frame too.
    I you want to loop the layer to the end this works fine now.

If you have a layer when the had already made a structure and want the frames loop from frame 11 - 25 because on frame 26 and further you already have made some animation.

On the other hand if you want to loop some animation in the middle of a layer. Lets say you want to loop frame 21 - 26 until frame 50 you need to be able to specify which frames you want to loop so this maybe get too complicated?

best regards
Mattias

Hi, I’ve spotted the same issue. Reading again eAthis post he mentions that:

It will loop every drawings encounters from frame 1 to the last drawing exposed

Indeed the solution that you found is to expose only the necessary drawings. Which is useful because you can control exactly what you need to loop.

Regarding the options, for a potential future update, I’d like to add, if is doable, to apply the script to multiple drawing module at the same time.

Cheers

Hi guys !

I finally came up with a version 2 of the script.

Here is the link :
https://drive.google.com/file/d/1srx0sGoaK2JeLRvMv4Mz9BCraXYfb1C6/view?usp=sharing

Improvements are :

Ability to choose if you want to cycle until the end of the scene or define a specific amount of cycles.

And

Ability to choose between cycling the whole frames (from frame 1 to the last drawing exposed), or cycling a specific range of frames.

I’ll try to come up with the Ping-Pong function soon.
Also cycling to a “destination frame” sounds interesting.

Anyway.
Please try it and tell me what you think.

Also if you can rename the thread with “[solved]”, it would be great.

best

eAthis

Thank you very much eAthis,

This works very nice.

  • As shown in my screenrecording you need to have empty frames after the frames you want it to loop to make it work. I guess that will change if you add a "cycling to destinaction " function.

  • Can you in a script set that the starting frame is set to current selected frame?

  • often when you use a script , you use it and press Ok. During the testing I had the script open when closing the software and the script was still there open. Maybe a thing in the script. I dont know.

Very nice to have this to work with.

( I think lucatcs is the one who can rename this thread as “solved”.)

/ best regards
Mattias

Hi !

Yeah indeed, the cycle to destination would solve that, it would be a great thing also.

I can definitively set the start frame to the current one, in fact I can fill the spinbox with this value when the ui opens. So you won’t have to touch it anymore except if you want to change the start frame.

If you close the program while it’s still open, indeed it won’t close, because there is no “ActionListener” in the script for now. But once again, it’s doable.

The two main updates I would do is :

  1. Making the script work also for keyframes. (so then you can loop animation also for cutout)

  2. Saving the last properties set in the ui, so when you open it again, you basically just have to press ok.

I will take a look also for the destination frame ^^

Hope you like it, cause it’s a long process to write and debug.

best

eAthis

Hi,

I really like this very much, and I understand there is much work to it.

The two updates sounds great.

Harmony has a node for looping keys frames in pegs ( transformation loop node I think its called ) but you cant use it for deformers so this would be great for that.
Would it be possible to loop several keys as a deformers often have several bones?

Once again. Thanks a lot!!!

/ Mattias

Hi eAthis!

Just curious…

Have you had the time to add the new functions to the script?

best regards

Mattias

A bit late into the discussion… Paste Special is mentioned but apparently not Sequence Fill. It doesn’t have a ping-pong option (I assume it wasn’t added in version 16 or 17) but that is something that could be requested. I’m trying to understand if I missed something or any type of control that I wouldn’t be able to perform with Sequence Fill and would require a script besides ping-pong.

With Sequence Fill, via the X-Sheet view (shortcut Control+M), you can select a range of frames, the whole layer, or several layers. Then you can select how many drawings in the cycle, the increment and the hold value. You can also define the end frame if you’re selecting the whole layer. So, for instance, if you have 10 birds with 8 drawings each and you want to fill the exposition with cycles, you select the 10 layers (i.e., 10 columns in the X-Sheet), select hold=2 (if you want it on 2s) and 16 frames for the cycle (8 drawings on 2s). You’ll have the cycles exposed in 10 layers in a few seconds.

This has its limitations which a script could solve, but it should also be easy for Toon Boom so improve if there’s interest in it. It doesn’t have a ping-pong option, it doesn’t consider existing drawings (if they don’t exist, empty ones will be created) and, in this case, you probably would want to offset the cycles, something this tool hasn’t the complexity to do. But it’s pretty fast to do it manually, for instance, going to column 2 and pull 2 frames, column 3 and pull 4 frames, etc. Or you can select columns 2-10 and pull 2, columns 3-10 and pull 4, etc.

Just wanted to add this option which can be useful for many situations for those who don’t know about it.

Thanks Icanau for this great info. I will test the workflow on this.

My maininterest is to have a good tool for looping images. I have sent it to toonboom so Maybe it will turn up in the future.
I have worked with TVpaint that have this great feature.

  • in the end of a number of frames you can tell the software, loop these until end of scene. Then you can change the loop and all copies will update and you dont have to copy paste again.
  • you can also loop a number of frames within a layer and set a stop frame.

You can loop keyframes with the transform loop but otherwise you have too copy and paste .

Epic - thank you for making this script. Works in TBH 15 too.