Page 1 of 1

toggle button

Posted: 25 Nov 2015, 05:22
by bluecarrot
Can we create a toggle style butoon in TVpaint?

It has been asked before, for example here:
http://tvpaint.com/forum/viewtopic.php? ... ase#p31805" onclick="window.open(this.href);return false;
Back then this functionality did not exist.

I would love to use it for inbetweening - flipping quickly to key drawings by pressing a button and then on releasing the button get popped back to the inbetween I'm drawing on. For example Ctrl/Shift/Left - in TVpaint that's "go to previous bookmark".
So let's say I'm on a frame that I intend to be the inbetween that I want to draw on. Now I want to press one of the Cintiq express keys that I programmed with the keystroke combination Ctrl/Shift/Left. Currently this brings me to a frame that I bookmarked (blue) to the left of my Inbetween, but if I let go of the express key button (the press/release idea) I'm staying on that frame. The desired behaviour would be to get back to the frame with the inbetween.

Re: toggle button

Posted: 25 Nov 2015, 09:39
by Fabrice
you have this option in the flip panel (TVPaint Animation 11 only)

Re: toggle button

Posted: 25 Nov 2015, 13:17
by schwarzgrau
In this case you could use the flip panel, but it would be nice if you could assign something like a toggle if you press the button long. Could be quite handy for something like the panning transform. If you press your shortcut short you select the tool, but if you keep it pressed you switch back to your last tool if you release the button.

Re: toggle button

Posted: 26 Nov 2015, 12:57
by NathanOtano
I agree it would be nice to be able to script a maintain button, with an action when we press it and another when we release it.

bluecarrot, right now we can still script kind of toggles by pressing again the same button and doing a different action. Like in those scripts from Svengali : http://forum.tvpaint.com/viewtopic.php?f=11&t=9298" onclick="window.open(this.href);return false;

Re: toggle button

Posted: 29 Nov 2015, 00:40
by bluecarrot
You guys know how to script and make buttons in TVpaint. Cool. I used to make buttons in Maya, which had an editor where you could copy and paste the codes of things, adding them up to create macro buttons to perform several operations. Other than that I know zero about coding but I want to learn how to make custom buttons in TVpaint. Any tips on where to start? Tutorials?

Re: toggle button

Posted: 29 Nov 2015, 14:44
by NathanOtano
Everything you need is here : http://wiki.tvpaint.com/index.php?title=George" onclick="window.open(this.href);return false;

Also you can ask questions in the adequat forum, everybody is open to help each other, and you can analyse scripts from others to find what you need.

You can script on a basic notepad and then copy paste it in a button of a custom panel in tvpaint.