How do you paint a stroke in Gimp with Python-fu? -


i'm using python-fu's gimp.pdb.gimp_paintbrush_default(layer, 2, [10,10, 20,20]), no matter how many strokes tell paint, ever paints first (x,y) (in case, (10,10)). expecting different format? documentation function isn't python plugin, , says third parameter expects variable of type floatarray. assume python version uses list here, doesn't seem ahead values after first two. how can paint more 1 control point?

the second parameter pass - in case "2" indicates gimp length of list in following parameter - although, when coding in python used called function don't have problem finding length of list, these calls in gimp python scripting 1:1 mapping gimp api several other languages, , written in c.

in c there no way 1 know length of array passed, unless explicitly passed, so, there need parameter.

try doing instead:

points =  [10,10, 20,20] pdb.gimp_paintbrush_default(layer, len(points), points) 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -