Brush saving/restoring! Tool Swap! QuickMask!

Share your custom panels, brushes, papers... (you need to be registered to read posts in this section)
Post Reply
User avatar
lemec
Posts: 1678
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Brush saving/restoring! Tool Swap! QuickMask!

Post by lemec »

I've made a pair of scripts that you can use in your own scripts or as part of a CP macro. These will save/load the current brush to a slot in the user config.

One particular use for this is to save your current brush before executing a complex macro that may use all manner of different tools and settings, and then restore your brush afterwards!

*doh* grg extensions aren't allowed and I'm too lazy to zip them...

http://www.digitalartoasis.com/viewtopic.php?p=321#321
Last edited by lemec on 22 Jun 2006, 10:12, edited 1 time in total.
(Win7x64, TVP Pro 11 32-bit)
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Post by ZigOtto »

it saves the brush (tool and shape) but not the color, neither when it's a custom (cut) brush,
I wonder, storing it in the brush bin isn't it a better way ?
User avatar
lemec
Posts: 1678
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Post by lemec »

Ah... but the special thing about this tool is it saves all your opacity/size/etc settings.

I figure that there are other commands available in the CP panel that a person could add manually, and there may be cases where you wouldn't want to have your brush colour automatically retrieved/stored.

Of course, you can do all this with tv_getAPen and tv_setAPen...

See, this tool will also know the difference between the airbrush and penbrush and propelling pencil, etc...

If you were using the penbrush and you saved it with this tool, and then you ran a script that were to put you onto a filled shape tool, or onto the airbrush, when you restored the tool, it would put you back onto the penbrush and restore all the settings.

It also performs the save dynamically -- something that CP panel buttons alone don't do. CP Panel buttons can only retrieve the tool they were set to use when they were created/edited.

The main use of this tool is for automation and macros -- being able to store a tool and switch back to it later...

If you wanted to, with a little bit of modification, you could easily create a macro to switch between the two most recently used tools (much like how the eraser end of the stylus works)
(Win7x64, TVP Pro 11 32-bit)
User avatar
lemec
Posts: 1678
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Post by lemec »

It's easy! see?

This one lets you swap between the stored tool and your current tool!
http://www.digitalartoasis.com/viewtopic.php?p=322#322

This script is a good example of what's possible with the new TVP-only command: tv_getActiveTool, one of several sdk additions I pestered poor Hervé for...

This command deserves to be the next wiki addition...
(Win7x64, TVP Pro 11 32-bit)
User avatar
lemec
Posts: 1678
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Post by lemec »

(Win7x64, TVP Pro 11 32-bit)
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Post by ZigOtto »

lemec wrote:It's easy! see?

This one lets you swap between the stored tool and your current tool!
http://www.digitalartoasis.com/viewtopic.php?p=322#322

This script is a good example of what's possible with the new TVP-only command: tv_getActiveTool, one of several sdk additions I pestered poor Hervé for...

This command deserves to be the next wiki addition...
wait a minute!
you are so fast... ah a new swap tool! ... let me see this one...
ohhhh I think I will LOVE this one !!!
so, please, DON'T stop your pestorations !........ :D
User avatar
lemec
Posts: 1678
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Post by lemec »

Yes!! This is why I pester Hervé so much... now I have to catch up to him and document all the new commands in the wiki in the hopes that other people can learn to use and benefit from them and make more tools on their own!

Scripting languages like George and MEL (Maya Embedded Language) are what make an animation package especially indispensable to a production house. Back in the days when I used to work in the visual effects industry, I had to work with Maya (the 3D animation software) and I made many many tools with their MEL scripting language. The most ubiquitous 3D softwares (softimage, 3DS Max, Maya) all have scripting languages so that technical eggheads (like me) can adapt a program into a company's workflow.

I don't know of many 2D bitmap (or vector, for that matter) animation packages that have a scripting language (or easily accessible plugin API) -- and it's a huge niche that TVPaint fills. Heck, it's whats allowing a not-to-be-named former distributor to continue to expand on the functionality of their end-of-line software...
(Win7x64, TVP Pro 11 32-bit)
User avatar
lemec
Posts: 1678
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Post by lemec »

Okay, I made a Custom panel for this... plus I added a QuickMask function that could be useful for painters. It lets you mask off regions and protect them from painting over them. It's basically a nicely automated stencil tool that can be easily toggled on/off

http://www.digitalartoasis.com/viewtopic.php?p=332#332

All this is thanks to Hervé's new GRG stencil functions and him being so nice about making it possible to flip the stencil display on/off through GRG!
Attachments
quickmask.jpg
quickmask.jpg (6.48 KiB) Viewed 3970 times
(Win7x64, TVP Pro 11 32-bit)
User avatar
Hervé
Site Admin
Posts: 3490
Joined: 08 Feb 2006, 17:00
Location: Metz France
Contact:

Post by Hervé »

lemec wrote:Okay, I made a Custom panel for this... plus I added a QuickMask function that could be useful for painters. It lets you mask off regions and protect them from painting over them. It's basically a nicely automated stencil tool that can be easily toggled on/off

http://www.digitalartoasis.com/viewtopic.php?p=332#332

All this is thanks to Hervé's new GRG stencil functions and him being so nice about making it possible to flip the stencil display on/off through GRG!
Nice, but you have wait for the next minor release.
User avatar
lemec
Posts: 1678
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Post by lemec »

you sure? Everything seems to work so far -- the layer stencil control, the Display Stencil option, etc...
(Win7x64, TVP Pro 11 32-bit)
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Post by Mads Juul »

I would really like to se/try these script but the server is down??

can you please upload these scripts??

-mads
User avatar
CartoonMonkey
Posts: 1087
Joined: 01 Jun 2007, 18:47
Location: Portland, Oregon
Contact:

Post by CartoonMonkey »

Me too!
Aahhh!
:)
User avatar
CartoonMonkey
Posts: 1087
Joined: 01 Jun 2007, 18:47
Location: Portland, Oregon
Contact:

Post by CartoonMonkey »

So, no one has a copy of this script?
User avatar
MrChoy
Posts: 118
Joined: 06 Jul 2006, 11:46
Location: uk

Post by MrChoy »

You could try PM'ing Lemec?
Post Reply