RSS/Atom feed Twitter
Site is read-only, email is disabled

gimp-context-set-brush-size. Why doesn't it work?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

gimp-context-set-brush-size. Why doesn't it work? Phoenix999 08 Aug 22:50
  gimp-context-set-brush-size. Why doesn't it work? Rob Antonishen 09 Aug 02:36
   gimp-context-set-brush-size. Why doesn't it work? Alexia Death 09 Aug 07:35
    gimp-context-set-brush-size. Why doesn't it work? Phoenix999 09 Aug 17:57
Phoenix999
2012-08-08 22:50:54 UTC (over 12 years ago)

gimp-context-set-brush-size. Why doesn't it work?

I've started writing a script. Within the script I've adjusted the brush size using gimp-context-set-brush-size. After running the script, the brush size has changed in the "Tool Options" area but when the script starts the drawing process, it ignores the "Tool Options" and draws using the brush default size of 180 by 180 pixels.

I primarily believe such problems are user errors. So what have I done incorrectly?

*CODE*

(define (script-fu-acrylic-spot image drawable )

(let*

( (width (car (gimp-image-width image))) (height (car (gimp-image-height image))) (points (make-vector 2 'double)) (x1 (* width 0.5))
(y1 (* height 0.5))
(brush-size-1 (* width 0.3)) )

;undo
(gimp-image-undo-group-start image)
;undo

(gimp-context-set-foreground '(0 0 0)) (gimp-context-set-brush "Acrylic 01") (gimp-context-set-brush-size brush-size-1)
(vector-set! points 0 x1) (vector-set! points 1 y1)
(gimp-paintbrush drawable 0 2 points PAINT-CONSTANT 0)
;undo
(gimp-image-undo-group-end image)
(gimp-displays-flush)
;undo
)

)

(script-fu-register "script-fu-acrylic-spot" "/Filters/acrylic spot"
"Testing Script"
"PD"
"PD"
"2012"
""
SF-IMAGE "image" 0
SF-DRAWABLE "drawable" 0
)

All input is truly appreciated.

Thank you.

-- View this message in context: http://gimp.1065349.n5.nabble.com/gimp-context-set-brush-size-Why-doesn-t-it-work-tp34797.html Sent from the Developers mailing list archive at Nabble.com.

Rob Antonishen
2012-08-09 02:36:51 UTC (over 12 years ago)

gimp-context-set-brush-size. Why doesn't it work?

I've started writing a script. Within the script I've adjusted the brush size using gimp-context-set-brush-size. After running the script, the brush size has changed in the "Tool Options" area but when the script starts the drawing process, it ignores the "Tool Options" and draws using the brush default size of 180 by 180 pixels.

-----

I ran into the same issue and did some testing. I don't think you can change the brush size of anything but parametric brushes.

-Rob A>

Alexia Death
2012-08-09 07:35:32 UTC (over 12 years ago)

gimp-context-set-brush-size. Why doesn't it work?

On Thu, Aug 9, 2012 at 5:36 AM, Rob Antonishen wrote:

I've started writing a script. Within the script I've adjusted the brush size
using gimp-context-set-brush-size. After running the script, the brush size has changed in the "Tool Options" area but when the script starts the drawing process, it ignores the "Tool Options" and draws using the brush default size of 180 by 180 pixels.

-----

I ran into the same issue and did some testing. I don't think you can change the brush size of anything but parametric brushes.

All scripts have their own context, they dont make use of the UI context. I think its a bug, that the set size operates on the UI context rather than script context.

Phoenix999
2012-08-09 17:57:10 UTC (over 12 years ago)

gimp-context-set-brush-size. Why doesn't it work?

So a brush that is not created by the user can not be changed in size within Script fu?

--
View this message in context: http://gimp.1065349.n5.nabble.com/gimp-context-set-brush-size-Why-doesn-t-it-work-tp34797p34803.html Sent from the Developers mailing list archive at Nabble.com.