It is currently Fri Apr 26, 2024 1:53 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: gimp-brush-duplicate
PostPosted: Wed Nov 26, 2014 1:17 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
GIMP Version: 2.8.14
Operating System: Windows
GIMP Experience: Beginner Level

List any relevant plug-ins or scripts:
gimp-brush-duplicate

List any ERROR messages you received:
generic
Error: (<unknown> : 49875626) Procedure execution of gimp-brush-duplicate failed




Hi all Gimp pdb experts
I would like to know
- when the "gimp-brush-duplicate" is accepted
- when it is not
Just writing a testing script which has a parameter "brush" in input and does nothing else than trying to execute the "gimp-brush-duplicate" -after the interactive user selection of the brush input parameter- sometimes it works some other times it shows the above generic error.
To simplify the test -avoiding problems which could arise from personal brushes- I repeated the test on my Gimp-portable, which I maintain clean as installed.
Same results.
Examples of accepted selections: 2. Hardness 050, 2. Star
Examples of not accepted selections: Acrylic 01, Sand dunes

The pdb description help doesn't specify any restriction on the input brush in the copy action, but there must be a hidden rule somewhere, which I wasn't able to discover.
Can someone help on this question?
Thanks a lot

_________________
"Where am I ?"


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Wed Nov 26, 2014 4:01 pm  (#2) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
A quick bit of empirical testing shows that these brushes can be duplicated:
1. Pixel
2. Block 01
2. Block 02
2. Block 03
2. Hardness 025
2. Hardness 050
2. Hardness 075
2. Hardness 100
2. Star

Using this code:
(define (script-fu-kp24_my_script)
  (let* (
          (brush-list-list (gimp-brushes-get-list ""))
          (num-brushes (car brush-list-list))
          (brush-list (car (cdr brush-list-list)))
          (new-brush "")
          (OK FALSE)
        )
        (for-each
          (lambda (this-brush)
            (set! OK TRUE)
            (catch (set! OK FALSE)(set! new-brush (car (gimp-brush-duplicate this-brush))))
            (if (= OK TRUE)
              (begin
                (gimp-message (string-append this-brush ":-" new-brush))
                (gimp-brush-delete new-brush)
              )
            )
          )brush-list
        )
  )
)

(script-fu-register "script-fu-kp24_my_script"
          "My TEST Script"
          "tipstrip"
          "copyright"
          "author"
          "fileversion"
          ""
)

(script-fu-menu-register "script-fu-kp24_my_script" "<Image>/contributed")


But I can't tell you why.

Kevin


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Wed Nov 26, 2014 4:27 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Thanks Kevin,
yes, there is a group of brushes which can be duplicated (my were only an example) but I can't see a reason why the others cannot...
should we open...a "lottery"? ...hehehe
(maybe a gimp developer can answer, if it happens that he reads this post)

_________________
"Where am I ?"


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Wed Nov 26, 2014 4:35 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
I run your tool on my system: exactly the same result!

_________________
"Where am I ?"


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Wed Nov 26, 2014 4:51 pm  (#5) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
"Parametric" brushes (those you can create with the brush editor) vs others?

Confirmed: only those that answer 'true' to gimp-brush-is-generated can be duplicated.

_________________
Image


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Wed Nov 26, 2014 8:04 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Gimp makes it hard to deal with brushes, in 2.8.14 the brush size can be adjusted but you still cannot adjust spacing, the brush spacing adj should be in the tools menu settings, if left at the bottom of the brushes, it should be adjustable via a pdb command at least

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 7:18 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
ofnuts wrote:
"Parametric" brushes (those you can create with the brush editor) vs others?

Confirmed: only those that answer 'true' to gimp-brush-is-generated can be duplicated.

Thanks, Ofnuts!
now comes the "derived" question:
how can I transform an existing brush (which I like and is of the wrong type, like Acrylic 01 and many others) into an "acceptable" one? Simply by copying it online and add some specifics? or just by copying and renaming it?

edit1: my first attempt was done opening "Acrylic 01" and saving (a copy) named "Acrylic 01 copy" into the same folder; that copy was available after reopening gimp, but still "not generated"(?)
what else should I do?

_________________
"Where am I ?"


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 7:48 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Nov 15, 2014
Posts: 161
@dinasset I'm sure this isn't the best way, and this may not be exactly what you were wanting, but the few brushes I have made from .abr's into .gbr's has been to install the .abr's in my brushes folder, open Gimp and 'open new' (to the size I want my brush) load the brush and adjust the size to fit, then a single stamp (click) from the brush, and export as a .gbr. Ta dah! 1 new, completely adjustable and customizable Gimp brush. I do apologize if this wasn't what you were going for, just trying to help if I can.


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 7:54 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
thanks Charlie, but the brushes I would like to have "duplicat-able" are brushes coming with the gimp installation pack, not installed by me from an .abr type brush

_________________
"Where am I ?"


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 7:56 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Nov 15, 2014
Posts: 161
Okay, sorry for bothering


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 8:59 am  (#11) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
dinasset wrote:
thanks Charlie, but the brushes I would like to have "duplicat-able" are brushes coming with the gimp installation pack, not installed by me from an .abr type brush


Why would you want to duplicate them in the first place? There is nothing you can do to them from a script (except perhaps the spacing)?

_________________
Image


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 9:26 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
I can also change the size on those which are accepted as duplicat-able

(gimp-context-set-brush brush-copy)
(gimp-context-set-brush-size 150) ...

_________________
"Where am I ?"


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 10:49 am  (#13) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
dinasset wrote:
I can also change the size on those which are accepted as duplicat-able

(gimp-context-set-brush brush-copy)
(gimp-context-set-brush-size 150) ...

You can do plenty of things with these and this is why they can be duplicated (because it's just another small set if generation parameters). But you can't change the size of the "bitmap" ones in a script. The user must provide you a brush at the proper size/angle. And this is consistent with the idea that the scripts use the current brush, whatever the user has set it to...

_________________
Image


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 11:17 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
so, the final question is:
- how can I generate a brush which is "duplicat-able" like those mentioned in previous entries (by Kevin and me)?
by knowing the way I can try to create new brushes similar to those I like...

edit: I see
I have to use the panel editor of the brushes!
but, unfortunately the shapes are very limited (geometric) not free as I would like....
I will see what I can do...

_________________
"Where am I ?"


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 3:30 pm  (#15) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
If you want to play with the other brushes, load them as images, transform them, copy the result to the clipboard, and then use the 'clipboard' brush (which is always the first one when you list available brushes).

_________________
Image


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 4:47 pm  (#16) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
ofnuts so by loading any brush (including brush pipes) to a image and copying to clipboard I can set the spacing of the clipboard brush

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 5:20 pm  (#17) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
You can't set the spacing of the clipboard brush form a script, it is considered "non editable".

_________________
Image


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Thu Nov 27, 2014 7:05 pm  (#18) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Then setting the spacing from within a script is a lost cause until Gimp gives us a means to do it

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Fri Nov 28, 2014 3:39 am  (#19) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Graechan wrote:
Then setting the spacing from within a script is a lost cause until Gimp gives us a means to do it


GIMP 2.10, if and when it gets released: https://git.gnome.org/browse/gimp/commi ... d3a04d7fbc

Kevin


Top
 Post subject: Re: gimp-brush-duplicate
PostPosted: Fri Nov 28, 2014 8:59 am  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
thanks, Kevin!
but I do not clearly understand which are the commitments for Gimp 2.10 concerning brushes; will it be possible to define a brush with a free shape (non strictly geometric), maybe copied from an existing brush or image? It would be nice.
(Of course it would be extremely nice also to have ALL brushes duplicatable, so that they can be adjusted thru script commands when using them...)

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Juxtapose exactly duplicate paths

2

No new posts Attachment(s) GEGL Jelly - Apply on Duplicate Layer above and use eraser

3

No new posts Attachment(s) Brush help

21

No new posts Attachment(s) Can't resize brush

23

No new posts Attachment(s) Grass GIH brush

6



* Login  



Powered by phpBB3 © phpBB Group