I can’t seem to solve this myself. I’m trying to have the surface placement(draw_mode) set to SURFACE for the active greasepencil after session starts or if possible, before.
def modal(self,context,event):
self.count +=1
actObj = bpy.context.active_object
if self.count == 1:
actObj.select = False
bpy.ops.gpencil.draw('INVOKE_DEFAULT',mode ="DRAW",)
bpy.data.grease_pencil.draw_mode = 'SURFACE'
if event.type in {'RET', 'NUMPAD_ENTER'}:
#do something