Re: [Gimp-user] Script-Fu vs GIMP UI

2009-09-15 Thread Ilya Zakharevich
On 2009-09-15, jolie S for...@gimpusers.com wrote:

???  Obviously, the same as when I click repeatedly along the path...
Imagine select color with add to selection and small threshold...

E.g., select colors close to any one in the path.

 You say you want to select a color close to any one in the path, but a path
 isn't a color. ??? 

Still, points on path have colors.  (Was it in vs on which made
this so hard to understand?)

 All I can think of is if when you stroke a path with say the foreground
 colour you get a line of that color where the path is. 

Wrong.  Try it with different brushes...

 So if you would stroke the path with a selection tool you would just select
 the path, so why not just use path to selection.

???  Are you under impression that a selection tool selects the point
you click on?  Or what?

[I specially mentioned color selection tool.]
 
Yours,
Ilya

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-Fu vs GIMP UI

2009-09-14 Thread Sven Neumann
Hi,

On Sun, 2009-09-13 at 23:42 +, Ilya Zakharevich wrote:

  I am afraid there is no way to do this for tools like 'color select' or
  'magic wand'. Tools are a user interface thing and the PDB explicitly
  doesn't give access to the user interface parts of GIMP.
 
 This sentence does not make any sense to me.  To make sense, one
 should have a PRIOR definition of the user interface parts of GIMP.
 E.g., from what you write, It looks like foreground color is not in
 the user interface parts of GIMP.

The foreground color is part of the context, which is not part of the
user interface. The user interface just controls the user context. The
fact that script-fu, or rather the PDB, allows to change things in the
user context, such as the foreground or background color, is actually a
misconception that was made early in the GIMP development. We tried
later to correct this by introducing script-specific contexts. But since
we didn't want to break existing scripts, we had to introduce
'gimp-context-push' and 'gimp-context-pop'. All scripts that wish to
change the context are supposed to use these, so that they get their own
context. This way the user context (which is what the GIMP user
interface uses), is not affected by scripts.

 So. is there such a definition?  Is it defined as any setting outside
 those related to save/restore-state Script-Fu API, or is there
 anything else accessible from Script-Fu?

The code in app makes a very clear distinction between the core and the
user interface. If you want to understand the details, please have a
look at the code.


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-Fu vs GIMP UI

2009-09-14 Thread Ilya Zakharevich
On 2009-09-14, Jolie S for...@gimpusers.com wrote:
 What kind of outcome are you expecting to get when stroking a path with a
 selection tool? 

???  Obviously, the same as when I click repeatedly along the path...
Imagine select color with add to selection and small threshold...

 I can't think of why you want to do this? Maybe someone can help you if we
 know what it is that you are trying to accomplish. 

E.g., select colors close to any one in the path.

Thanks,
Ilya

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-Fu vs GIMP UI

2009-09-13 Thread Ilya Zakharevich
On 2009-09-13, Sven Neumann s...@gimp.org wrote:
 I want to stroke the path with the current tool, with all the
 parameters as selected in the tool options.  I do not think I can do
 it with the PATHs right-mouse-click menu, can I?

 (What I see are only choices of Paint tools.  What I want is Select
 tools, like color select and/or magic wand.)

 You can't do that.

Is it a defect, or an intentional decision?

 An alternative would be to use Script-Fu API to walk along a path;
 but I would need to invoke the current tool at the specified point
 from Script-Fu, and I can't guess how to find this with the Script-Fu
 procedure browser...

 I am afraid there is no way to do this for tools like 'color select' or
 'magic wand'. Tools are a user interface thing and the PDB explicitly
 doesn't give access to the user interface parts of GIMP.

This sentence does not make any sense to me.  To make sense, one
should have a PRIOR definition of the user interface parts of GIMP.
E.g., from what you write, It looks like foreground color is not in
the user interface parts of GIMP.

So. is there such a definition?  Is it defined as any setting outside
those related to save/restore-state Script-Fu API, or is there
anything else accessible from Script-Fu?

Thanks,
Ilya

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Script-Fu vs GIMP UI

2009-09-13 Thread Jolie S
What kind of outcome are you expecting to get when stroking a path with a
selection tool? 
I can't think of why you want to do this? Maybe someone can help you if we
know what it is that you are trying to accomplish. 

-- 
jolie (via www.gimpusers.com)
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user