0
$\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$
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$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.