Loop Drawings automatically

Hi, I’m using TB16 I want to create an animation loop of birds flapping the wings.
I will have 10 different birds, with 10 different loops.
I wonder if anyone knows a script that allows us, at the end of the animation process, to set the exposure of a specific drawing on a loop like 123123123 etc.
I’m aware that I can do that with a right click on a drawing and use"create cycle", but it takes time to do, especially if you have to do that for 10 characters for a lot of shots.
Does anyone know a script or a fast way to do that, please?

I would be interested in knowing script for that too.

The best would be to have a feature like TVpaint where you can set a amount of frame to loop. then it’s very easy to update.
The create cycle is not so flexible if you want to change it.

There is a transformation loop node but that is only for key frames set in a peg.

A similar for images would be very very useful.

Hi !

Maybe I can take care of that script. Looks like a great idea !

Gimme more info on how you would like it to work.

Best

eAthis

Hi eAthis,

that would be nice.

I think maybe me and lucatcs have different things ´we want and I am not sure how much a script can do and if it’s good in updating things.

Thats interesting is if you can:

  1. set in the end of sequence of frames set it too loop( repeat ) or ping-pong them forward to the endframe of the layer.

and

  1. loop a part of the images in a layer like you can do in TVpaint.

https://www.tvpaint.com/doc/tvp11/index.php?id=lesson-tradigital-animation-advanced-repeat-images

Then you can add a frame later in the layer and that mean the loopscript are broken.

/ Mattias

I dont know if the script does add frames or how it works.

Thank eAthis and Mattias for be interested in this task.
I don’t know" TV paint" but the options that Mattias says seems interesting. At now, my idea was something “simple” like this:

-select drawing module (or multiple drawings modules)
-The script detects how many drawing substitutions there are in the drawing module (let’s say 3)
-the script set the exposure of that drawing module to 123123123 etc. (until the end of the timeline)
OPTIONS: set the exposure as ping pong or forward or reverse (those options are already available in the “Create cycle” system)

Thanks, guys for the effort that you’re putting in this :smiley: I really appreciate

Hmmm…

Well, I think there is no way to tell Harmony to show specific images without exposing them. What TVPaint can do actually.

So I think it’s doable, but it will expose the images. Maybe you can choose the “from which frame to which frame” you want the loop to loop and setting the range of frame you want to loop.
It will probably work like :

_ You define the range of frame you wanna loop

_ You define the frame on which the loop start.

_ And if needed, you define the last frame on which you want the loop to end.

On another hand, it would be easier indeed to tell the script to loop or pingpong the sequence in the layer. So you would have to define only the frame on which you want the loop to start.

Am I right ?

best

eAthis

Hi,

I guess it could be difficult to do the TVpaint feature. I have mentioned this to Harmony support so they might end up with something as good some day.

The both ideas you mention and to be doeable are both great.

I guess its good to start simple and see what comes out of it.

I anm already eager to test this.

/ Mattias

Hi eAthis, thanks the second option I think is the easiest one.

On another hand, it would be easier indeed to tell the script to loop or ping-pong the sequence in the layer. So you would have to define only the frame on which you want the loop to start.

Can you help us to develop a script with this feature?

of course prefer this one, because it reflects my need now :D, Mattias has other targets I guess.

again
Many Thanks

Hi again,

I’ll try to come up soon with a working script.
I’ll let you know how it goes and how far we can go.

Stay tuned it will work !

best

eAthis

The second one is very good for me too.
The other one be left to later if needed.
/ Mattias

Hi !

Here is a first pass working one.

https://drive.google.com/file/d/1dD4UdIOndqCJzeopjRg_IdFw1t_8MsvQ/view?usp=sharing

You basically have to select a layer, this layer should have drawings exposed from the frame 1. It will loop every drawings encounters from frame 1 to the last drawing exposed.
you have to select the frame on which you want to start looping.

Let me know how it goes.

Best

eAthis

BOOM! work like a charm!
It does exactly what i need.
You was really fast :smiley:
Thanks, eAthis :smiley:
You really make my day!
A big Thanks
A big thanks also to you Mattias :smiley:

about icon what about this one?
https://pasteboard.co/IhRbMgQ.png

Hi,

Thanks! You did this fast.

It works very well. I dont know so much about scripting so I dont know what´s doable

I did some testing. And I have some thoughts.

  1. if the layer has an empty layer ( = a hold until endframe ) it loops the frames one time.
    if there is no frames added and you add the loop from the last frame the frames will loop several times until end scene.

  2. I was thinking if there would be an option to loop the frames an specific amount of times. Would that work?

  3. Another option would be if you want to loop frame 6- 12 3 times you might be able to spec in the script that you want to
    “loop frame ___ to ____” 3 times.

  4. I was also thinking the possibility to update a loop. The original loop is frame 6 .- 12. You have looped that. But then you decide to change that loop.
    You can then of course just delete the looped frames and do it again but maybe its easy in the script to overwrite frames.

As I said I dont know what is possible to do.

And of course an icon for this great script would be perfect so you have to have the wheel icon like everyone else.

Very well done, eAthis!
And thanks, lucatcs for bringing this up!

/ Mattias

Your welcome !

I would say that everything is possible, but then time is needed to cover all the cases.

So to give you an answer :

  1. Don’t think I understand the issue . If you hold a drawing, you can hold it till the end nope ?

  2. Yes it would work. For now it loops until the end, but adding a field in which you choose how many times you want to loop it is doable. Need more time though.

  3. sure. But that is the other option I mention above. Same thing, need more time.

  4. Doable as well, but then you would need to carry this moment you change the range of looping frames. So you will have something running behind, waiting for that moment. It can slow Harmony a bit I guess. Not the best option for me because you would need a button or something to tell the listener to stop listening.

Glad you’re happy already.

To be continued.
Best

eAthis

Hi,

The icon looks good. I dont know how you add that to the script though.

Yes, I understand and It should not be too complicated to use.

Some things are a bit hard to explain in words. easier to send you a screenrecording later on.

I test this further and give feedback later on.

Maybe it´s easier to send this to your mail.
My mail is mattias@gordon.se if you want to connect regarding this.

/ Mattias

Hi Mattias, here some tips about how to add icons for the scripts
https://docs.toonboom.com/help/harmony-15/essentials/scripting/link-script-button.html

Thanks,

I do what the manual say but I get no icon on the button. Dont know why I do wrong.

When you select the setLoop Type in the Files window there are also a file called “createWidget” and “letsGo”. What are these files for?

/ Mattias

Hey !

Put the recording later here. It’s better if it’s profitable for others.
If you cannot see the icon it’s because you put the script in the scripting bar already. Remove it, apply, then reopen and push the icon to the script. Then add the script to the list. It should be there.

“createWidget” and “letsGo” are functions inside the script. They are called through the main function which I called setLoop.

eAthis

Hi,

Of course that’s better.

The problem was that I downloaded the icon from lucatcs but at first I did not manage to download the png so that why it did not work. It was not a correct file-format. Now it works fine.

I get back with ideas for the script when doing some tests later on.

Thanks so far.

/ Mattias