09-14-2023, 01:32 AM
(09-13-2023, 07:26 AM)Ofnuts Wrote: The catch is that the num_strokes parameter is the number of coordinates, not the number of strokes (so, the size of the list...). So in your case it should be 4, not 2.
Refreshing scripts re-runs them for registration, so my guess is that if they contain syntax errors, they can't run, so are deregistered.
1. I would say that this is simple size of array. Because coordinates are two. Stroke is one. (In my example).
2,Then how is possible that these scripts were registered at GIMP start, worked fine and get deregistered at refreshing WITHOUT any change to them?
3.How to create a variable of type "GimpFloatArray" from code? Why this is not documented? Why when I do this:
Code:
(define (script-fu-foobar image drawable orientation)
(let*
(
(area-width 1000)
(area-height 1000)
)
(gimp-paintbrush-default drawable 4 '#(0 0 area-width area-height))
(gimp-displays-flush)
)
)
Code:
Error: in script, expected type: numeric for element 3 of argument 3 to gimp-paintbrush-default #(0 0 area-width area-height)
But when I (print area-width) before (gimp-paintbrush...) it display 1000 so what is "numeric" then?