Re: Brushes/input controllers changes idea

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexia Death wrote:
> Gimp is large code wise. I opted for trying to understand the bits 
> I'm working on and not the whole thing at once ;)

That would only be the ultimate goal, of course. ;)

> I have been hacking in the event side of things since early this year
>  and I'm slowly starting to get a clue how things relate to each 
> other. Perhaps best for you to learn is to trace events stating from
>  display shell callbacks to the drawing code in various tools to get
>  the overview you need?

Thanks for the hint, I will try this approach. :)

> As I understand it now paint core handles most of painting related 
> stuff, different brush types are dervates of GimpBrush that overload
>  the functions in witch thy differ. Making a new brush type should
> not be that difficult, but integrating it to UI... That part is a
> mystery to me.

Maybe adding a new brush type wouldn't be difficult, but actually
implementing a component based "brush synthesizer" (to use David
Hodson's ARP 2500 analogy ;)) might be.

The problem with a selection of hardcoded brush types seems to be that
artists cannot really be creative with creating brushes since they would
have to be developers at the same time.

Where hard coding is required in the brush engine, it should be done
using dynamically loadable modules (or plug-ins, if you will).

The real power of such a system would come from combining the predefined
components in ways the developers had never thought of, which means not
just twisting knobs on predefined brushes, but also pushing the
components around on a filter stack and being able to configure which
parameters are affected by the filter (much like in David's proposal).

But I do understand that this would be quite a huge task (especially
with a GUI to match).

David Gowers schrieb:
> On Wed, Mar 12, 2008 at 9:21 AM, Alexia Death <alexiadeath@xxxxxxxxx 
> wrote:
>> And dynamics,,, That's important too IMHO. Ability to bind any 
>> brush property to one or more motion dynamics, primary or derived 
>> (speed, tilt,pressure,angular speed, etc...) .
> Angular speed? Do you mean 'turning speed', otherwise known as 
> torque?

Angular speed actually is the correct term ;) (torque is what causes
angular acceleration). The angular speed would be obtained by
approximating the motion of the brush with a circular curve and
calculating the change of angle along this segment per time unit. It
actually would be a data source to be mapped, rather than a target.

Bill Skaggs wrote:
> That isn't easy.  I suggest, very strongly, that you start by picking
>  a single, relatively simple, type of change you would like to make, 
> instead of thinking in general terms. This will make it possible to 
> point you to the relevant parts of the code, and perhaps even to 
> describe how those parts work.  Once you have learned from this 
> experience, it will be much easier to go on to other things.

You are right of course. But it is difficult to suggest even simple
changes without having a good general understanding of the code (I am
just referring to the brush right now and how the chain progresses from
the actual input to the brush image appearing on the canvas).

Anyway, I think I am progressing, slowly, with a general idea of how
things work. I am currently trying to figure out:

1) How to add a new tool (say, my own hardcoded brush) including widgets
for setting options to the UI. The ChangeLog suggests that bits of code
have to be added all over the place (gimp-tools.c, gimp-paint.c for the
tool, where the UI gets added I have currently no idea).

2) What changes in the state if a new tool is selected.

3) How the tool is invoked. I think I have a general idea, that is, the
button_press/motion/button_release events get passed down from the
gimp_display_shell to tool_manager, to the active tool (brush,_tool,
which is a paint_tool in this case), to the paint_core, to the brush
core (paintbrush in this case).

4) How the brush gets applied to the canvas. Right now I think a mask is
obtained from whatever brush is selected and this is then pasted to the
canvas using the various options.

Souichi TAKASHIGE schrieb:
> I'm recently working on developing new PaintBrush extension 
> framework. It's on early development stage, but I'd like to get 
> comments about the framework.

I would be happy to play around with it, if it can be applied to a
current version of GIMP. :)

I do not quite understand what the blend brush actually does, but it
looks cool. ;)

Cheers,

Joern

_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux