2
$\begingroup$

I am trying to fill enclosed shapes in Grease Pencil using Python Script, as if using the fill tool. There seems to be a Grease Pencil operator, but I haven’t been able to figure out how to use it in the script (bpy.ops.gpencil.fill()). Any help would be much appreciated.

$\endgroup$

1 Answer 1

0
$\begingroup$
bpy.data.grease_pencil["GPencil.001"].palettes["GP_Palette"].colors["Color.002"].fill_alpha = 0.6

-should do the trick. Hover the mouse of the Fill -> Opacity slider in the properties panel(N) and take a look at the command that shows in the popup. Change the names of the "GPencil.001" and the "Color.002" to the ones that the command is pointing to(the ones you are using).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .