Skip to content

script-fu: fix calls to gimp-context-set-[pattern/brush]

Anders Jonsson requested to merge ajonsson/gimp:scheme-script-fixes into master

Similar to font calls in #11354 (closed)

The scm scripts Paste as Brush/Pattern, and the four brush creation options in the Brush Menu now give errors, and fails to set the created brush or pattern.

scriptfu-Message: 15:54:04.719: Error while executing script-fu-paste-as-brush:
Error: in script, expected type: integer for argument 1 to gimp-context-set-brush 
scriptfu-Message: 09:57:09.205: Error while executing script-fu-paste-as-pattern:
Error: in script, expected type: integer for argument 1 to gimp-context-set-pattern  
scriptfu-Message: 01:33:48.572: Fel vid körning av script-fu-make-brush-rectangular:
Error: in script, expected type: integer for argument 1 to gimp-context-set-brush  

This is since gimp-context-set-brush and gimp-context-set-pattern no longer can be called just with a name.

Use gimp-brush-get-by-name and gimp-pattern-get-by-name to solve this.

Merge request reports