FigureFill - one-click to Fill Line Drawings

Share your custom panels, brushes, papers... (you need to be registered to read posts in this section)
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

FigureFill - one-click to Fill Line Drawings

Post by Svengali »

What is FigFill?

One thing many animators often need to do is take an outline drawing and fill it in to make it opaque when displayed against a background or other figures or props on lower layers. Currently TVPaint doesn't have an easy, one click tool that lets you do this.

The FigFill button (and the figfill.grg script it calls) provide an interim solution to fulfill this need.

Before Using FigFill
Several requirements you must ALWAYS have in place before using FigFill:
1. Make sure you have created a FILL layer BELOW you’re outline drawing layer, where your filled shapes will be formed.
2. Make sure the Bpen color is set to the color you want to use for filling.
3. Make sure you are on the line drawing layer when you click the FigFill button and seed the fill.

To use the FigFill Button:
1. Be on the layer with the drawing.
2. Click the FigFill button.
3. When the full-screen crosshair appears, click your stylus or Left Mouse Button on an area OUTSIDE the figure.
4. That's it… all closed shapes will generate opaque BPen Color fills on the next layer down in precise registration.
outline and fill layers.png
outline and fill layers.png (24.63 KiB) Viewed 7430 times
The background areas remain transparent and all of the enclosed figures will show as filled with the Bpen color you chose (on the fill layer below).
FigureFill.gif
FigureFill.gif (56.51 KiB) Viewed 7430 times
If you have some negative shape within your figure, you have the option in step 3 to draw a straight line starting on the background and ending within the closed negative area. When you lift your stylus tip or release the Left Mouse Button, the fill is applied to all the shapes and the negative shape where you raised the stylus tip or Mouse Button will remain unfilled with the background showing through.

Apply FigFill Over SELECTED Frames on a drawing Layer
If you want to fill multiple frames on a drawn outline layer in one shot... simply select those frames, then click the FigFill button and click on an area of background outside of where the figures may appear in any of the frames. FigFill will generate filled shapes on the FILL layer below for all the selected frames.

UNDO (control Z) the Fill
Whether one frame or multiple frames were filled, you can immediately press Control Z to undo the fill process in a single step.

CAUTION
Error trapping is minimal in this script so be careful that you have a blank fill layer with sufficient number of frames for the fills. Also, be sure you are on the outline layer when you start a fill. The UNDO (control+Z) button should fix any error that might happen IF you click UNDO immediately.

Please report any problems by posting in this thread.

Sven

NOTICE (April 13) This download is the NEW version = Figure Fill 9&10.tvpx - it replaces the original version that users had problems with. If you haven't done so, download this version and reinstall the FigFill panel. (This one is the same version for download that was posted on page two in this thread on April 11. Click HERE to jump to that post for more details on usage including the newly added +FILL button.)
Attachments
Figure Fill 9&10.tvpx
updated april 16 to guarantee that "color" mode is selected for the filling process
(114.5 KiB) Downloaded 567 times
Last edited by Svengali on 16 Apr 2012, 22:52, edited 5 times in total.
Elodie
Posts: 13912
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: FigureFill - one-click to Fill Line Drawings

Post by Elodie »

Thank you for sharing your panel + writing such complete explanations :D
BenEcosse
Posts: 162
Joined: 08 Dec 2008, 23:13

Re: FigureFill - one-click to Fill Line Drawings

Post by BenEcosse »

This is excellent! Really helpful script
Last edited by BenEcosse on 05 May 2016, 11:49, edited 1 time in total.
User avatar
Animark
Posts: 505
Joined: 16 Oct 2008, 15:26
Location: Berlin

Re: FigureFill - one-click to Fill Line Drawings

Post by Animark »

Hello,

yeah, what I nice idea. I think, I would really love this FigureFill, unfortunately it is not working here. Maybe I am doing something wrong?

I installed the .tvpx using drag and drop onto TVPaint 10.0.5 on Win7/64. Installation was successful, the Figure Fill panel appeared and looks exactly like the picture in the manual.
OK, I made a drawing with a closed shape, added a new empty layer below with a empty frame. On the line art layer I've choosen the figure fill tool and clicked outside of the drawing. Something was happend then (some blinking at the main panel and at the stencil icon), but nothing was filled.

Then I tried different ways of clicking and stroking, tried with more drawings, lower resolutions, other BPen colors, different tools before choosen the figurefill - but everytime the same results.
Then I tried with TVPaint 9.5.21 on the same computer with exactly same behaviour and results.
Edit: I made a third test on my tablet pc - TVP10.0.4 / WinXP 32 - also with the same results :-(

What can I do now? It would be really great to get this script running. Do I have to install a george-script somewhere?

Greetings and thanks from Animark
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: FigureFill - one-click to Fill Line Drawings

Post by Svengali »

Animark wrote:What can I do now? It would be really great to get this script running. Do I have to install a george-script somewhere
Thanks for trying FigureFill. It sounds like you are doing everything right. the TVPX file installs the proper script automatically in the George folder. If you want to confirm that, check there for a script called "FigFill.grg". If you are seeing some kind of activity when you press the FigFill button then the script is executing.

Things to try...

First, make sure the tool mode is set to COLOR before you try filling (in the next version I will modify the script to make sure COLOR is the tool mode).

Also, make sure the Fill Layer isn't locked.

Finally, you might download the zip file and re-install it again. The first uploaded version had a typo in it.

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

Re: FigureFill - one-click to Fill Line Drawings

Post by Svengali »

To anyone who downloads and tries out the FigFill plugin.

If you test or use the FigFill button (and script) please give us a little feedback on your experience with it - whether it worked or not (specific symptoms when it doesn't), whether it worked as expected and what problems, if any, were encountered. Also, ways it might be improved.

This helps me refine the script and helps others who may be having problems. Thanks.

Sven
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Re: FigureFill - one-click to Fill Line Drawings

Post by ZigOtto »

hi Sven, and thanks for your clever contribution . 8)

I've just downloaded and tried your FigureFill custom panel, and it seems I am in the same boat with Animark,
my fisrt question is : why don't you use Embedded Script ?
fillinvert.png
fillinvert.png (6.29 KiB) Viewed 7368 times
I am looking for your FigFill.grg file everywhere on my HDs, no way to localise it,
and my C:\Program Files\TVPaint Developpement\TVPaint Animation 10 Pro (32bits)\George folder is empty ...

if for the next release, you copy/paste your george script to make it "embedded", the script will be definitively part of the tvpx file,
I think it's the best way to share buttons with script(s) inside .
:wink:

ps: curiously, the fullscreen crosshair appears, ... the A to B straight-line works too, but no filling area result ...(v10.0.6)
a quick test on a v9.5, and here it fills with the B color, but the whole project area, disregarding the closed lines ...
ps2 : in v9.5, I finally localised the FigFill.grg in C:\Documents and Settings\myAccount\Application Data\tvp animation 9 pro\default\george folder,
and after having changed some filling settings (source = front), it takes now account of the lines, but don't "invert" the filling ... :?
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: FigureFill - one-click to Fill Line Drawings

Post by Svengali »

OK. I'll have a look later tonight and will post an update. I've got an additional button or two pending for the FILL group. If I get those working I'll upload them as well.

Sven
BenEcosse
Posts: 162
Joined: 08 Dec 2008, 23:13

Re: FigureFill - one-click to Fill Line Drawings

Post by BenEcosse »

I initially couldn't get the FigFill to work either.
Last edited by BenEcosse on 05 May 2016, 11:48, edited 1 time in total.
User avatar
Animark
Posts: 505
Joined: 16 Oct 2008, 15:26
Location: Berlin

Re: FigureFill - one-click to Fill Line Drawings

Post by Animark »

Hi Svengali,

I've located the FigFill.grg on my computer:
For TVP 10: C:\Users\UserName\AppData\Roaming\tvp animation 10 pro\default\george\FigureFill\FigFill.grg
For TVP 9.5: C:\Users\UserName\AppData\Roaming\tvp animation 9 pro\default\george\FigureFill\FigFill.grg

I've tested BenEcosse workaround on TVP 10.0.5 and can confirm. When the floodfill bucket is set to "display", your script seems to work fine.
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: FigureFill - one-click to Fill Line Drawings

Post by Svengali »

All I can say is the script, the button panel and the TVPX file were generated on my desktop, a PC running XP. When the zipped TVPX is downloaded and dropped into a Win7 version of TVPaint, the GEORGE script ends up in the folder where you all found it. I downloaded and installed the TVPX on my laptop (running Win7) and had the same problem as you - changing the FloodFill Source to "Display" worked for me, too (it shouldn't matter what Source is set to at the start, because the script explicitly sets Source to "Above" before the fills are generated (see lines 55, 71 and 86). :roll:

Upon reflection, those TVPaint users who have not upgraded to version 10 may never be able to get FigFill to work. There may be a few commands I have used that are specific to release 10. The WIKI is silent about which GEORGE commands were introduced with which versions of TVPaint.

Next time I'll trouble shoot any button/script plugin I upload here, testing in both Windows environments, first. Herve and the gang must really have issues working with multiple OS versions for major TVPaint upgrades... and across three platforms, Yipes!

Zig: I tried to use embedded scripts but gave up: the little window editor is rather flaky and SO small... comments are out of the question. It's like building a sailing ship in a bottle for me - but your argument about keeping all the components together in one place is a point well taken. I will experiment.

Meanwhile, if I can find a solution to make FigFill work as advertised, straight out of the zipped file, I will post it later in this thread.

Thanks for the feed back everyone. Let me know to if FigFill continues to run smoothly for you. :|

Sven
User avatar
ematecki
Site Admin
Posts: 2259
Joined: 15 Feb 2006, 14:32

Re: FigureFill - one-click to Fill Line Drawings

Post by ematecki »

Svengali wrote:Zig: I tried to use embedded scripts but gave up: the little window editor is rather flaky and SO small... comments are out of the question. It's like building a sailing ship in a bottle for me - but your argument about keeping all the components together in one place is a point well taken. I will experiment.
You can use any editor, and just copy/paste into that tiny window.
Quicktime is DEAD. Get over it and move on !
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Re: FigureFill - one-click to Fill Line Drawings

Post by ZigOtto »

Svengali wrote:...
Zig: I tried to use embedded scripts but gave up: the little window editor is rather flaky and SO small... comments are out of the question. It's like building a sailing ship in a bottle for me - but your argument about keeping all the components together in one place is a point well taken. I will experiment.
ematecki wrote:... You can use any editor, and just copy/paste into that tiny window.
:o do you mean you both don't have a resizable script window as I have here, (and that since several builds I think) ?
embeddedscript-resize.png
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: FigureFill - one-click to Fill Line Drawings

Post by Svengali »

ZigOtto wrote::o do you mean you both don't have a resizable script window as I have here, (and that since several builds I think) ?
Haha. I never noticed that the embed editor window was scalable, which helps a bit.

However, the whole development cycle for a fairly complicated script, especially one which requires dozens of edits,failures and retries before it finally begins to work as intended, followed by many more iterations in which the essential parts are refined, commented and made friendly is something that could only be done in a real-world programming editor.

The main reason I comment my scripts so heavily is so I can use earlier scripts as reference when constructing new scripts. Multiple-windows, function and template libraries, syntax color-coding and checking... and sophisticated cut and paste tools are a few of the things even the simplest code editor provides. (I use something called TextPad which is very basic, but streamlines what I need... it's inexpensive with frequent, free updates.)

Another thing about embedding scripts that has bit me a few times is the overhead in keeping all duplicate button clones (with their individually embedded scripts) current. On the other hand, if all my cloned buttons call out to the same script, then any frequent changes in the script will work with all similar buttons.

On Ematecki's advice I will try cut-and-paste embedding with this and other distributed scripts to see if TVPX bundling works better that way. It simply requires that I be more diligent separating development scripts and all their variations from the distributed final version of my script. :|

Sven
User avatar
D.T. Nethery
Posts: 4225
Joined: 27 Sep 2006, 19:19

Re: FigureFill - one-click to Fill Line Drawings

Post by D.T. Nethery »

The background areas remain transparent and all of the enclosed figures will show as filled with the Bpen color you chose (on the fill layer below).

4. That's it… all closed shapes will generate opaque BPen Color fills on the next layer down in precise registration.

When I try it the B-Pen color fills OUTSIDE the figure or closed shapes , leaving the interior of the figure /closed shape transparent , not filled in with opaque color .

I am on Mac OS 10.7 , TVPaint 10.0.5
Post Reply