tv_SaveBrush and tv_LoadBrush with alpha masking

A forum dedicated to George scripting questions
Post Reply
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

tv_SaveBrush and tv_LoadBrush with alpha masking

Post by Svengali »

I'm trying to understand tv_SaveBrush and tv_LoadBrush commands: If I have a cutbrush with some transparent areas and I save it using tv_SaveBrush, then reload it using tv_LoadBrush, those transparent areas are converted into opaque pixels of the background color.

Question: How do I maintain transparency for a reloaded, single frame cutbrush? Is it a matter of syntax when saving??? or when loading??? or does it relate to the file format I choose to save it in? Is there some additional commands I use first to establish that I want to retain transparency when I save/reload the cutbrush?

I've used SaveBrushAnim to save a single frame cutbrush but I can't seem to reliably reload the single frame cutbrush without sometimes getting extra "junk" frames - stuff leftover from other, multiframe cutbrushes that I've previously used.

So, what commands? what syntax?

Thanks Sven
User avatar
Hervé
Site Admin
Posts: 3490
Joined: 08 Feb 2006, 17:00
Location: Metz France
Contact:

Re: tv_SaveBrush and tv_LoadBrush with alpha masking

Post by Hervé »

Svengali wrote:I'm trying to understand tv_SaveBrush and tv_LoadBrush commands: If I have a cutbrush with some transparent areas and I save it using tv_SaveBrush, then reload it using tv_LoadBrush, those transparent areas are converted into opaque pixels of the background color.
It's a bug. It will be fixed on the new update.

tv_loadbrushanim is bugged too, you can add the image start and image count after the file name but actually the load process stretch the animation to the original frame count.
Hervé ADAM, TVPaint Team
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: tv_SaveBrush and tv_LoadBrush with alpha masking

Post by Svengali »

Hervé

Thanks for the information and I look forward to the new update! It will help solve many problems for managing brushes. :D

Sven
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: tv_SaveBrush and tv_LoadBrush with alpha masking

Post by Svengali »

9.5.4 update appears to fix the savebrush and loadbrush commands... thank you!

Still, the LoadBrushAnim command sometimes generates a file-not-found error which I can't quite understand... :cry:
Sven
User avatar
Hervé
Site Admin
Posts: 3490
Joined: 08 Feb 2006, 17:00
Location: Metz France
Contact:

Re: tv_SaveBrush and tv_LoadBrush with alpha masking

Post by Hervé »

Svengali wrote:9.5.4 update appears to fix the savebrush and loadbrush commands... thank you!

Still, the LoadBrushAnim command sometimes generates a file-not-found error which I can't quite understand... :cry:
Sven
if the path in the tv_loadbrushanim cmd is not valid, the cmd try to find the file in the several folder:
running path, "installation path/data", current configuration dir, plugins dir, home dir, george dir, temp dir, ...
if the find is not found the cmd return an error ( -1 )
Hervé ADAM, TVPaint Team
Post Reply