12-24-2022, 07:35 PM
(12-23-2022, 08:56 PM)Ofnuts Wrote:
- Instead of having a script parameter, maybe the script could be sensitive to the brush spacing (as it is to the brush size, etc...) using pdb.gimp_context_get_brush_spacing()?
- Of course I'm interested
That was a great suggestion but it does pose a bit of a pickle...
If I just use:
Code:
self.brushSpacing=float(pdb.gimp_context_get_brush_spacing())
and it works the way I like (i.e. the stipple pattern will be at the spacing you get if you draw with the paintbrush so you can actual test the stipple spacing by just stroking a straight line) but this is counter-intutive to the current operation as the plugin spaces based on the brush size (i.e. 100% spacing). The issue is that brushes that aren't intended to be "stamps" will have a fractional spacing by default so they stoke smoothly. So this would require users to manually change the spacing of the brush before running the plugin.
Alternately, I can use this:
Code:
self.brushSpacing=float(pdb.gimp_context_get_brush_spacing()/pdb.gimp_brush_get_spacing(pdb.gimp_context_get_brush())*100.)
to still allow the user to change the spacing of the stipple by using the ratio of the currently set spacing over the brush's default spacing. So selecting a brush and using the default spacing will place the stipples with a spacing equal to the brush size. To space the stipples closer or further together the user will have to select a spacing smaller or larger than the default spacing for the brush, and knowing what that will result in is somewhat counter-intuitive...
Any thoughts on the preferred option?
-RobA>