gpencil_selectmode_edit restore

gpv2 v1.5.1
Christophe SEUX 2021-06-17 18:22:12 +02:00
parent beba17fe2f
commit 2b4c797e7e
1 changed files with 2 additions and 0 deletions

View File

@ -358,6 +358,7 @@ class GPTB_OT_eraser(Operator):
# stroke.points[index].select = False # stroke.points[index].select = False
#bpy.ops.object.mode_set(mode='OBJECT') #bpy.ops.object.mode_set(mode='OBJECT')
context.scene.tool_settings.gpencil_selectmode_edit = self.gpencil_selectmode_edit
bpy.ops.object.mode_set(mode='PAINT_GPENCIL') bpy.ops.object.mode_set(mode='PAINT_GPENCIL')
#selected_strokes = [s for s in self.gp_frame.strokes if s.select] #selected_strokes = [s for s in self.gp_frame.strokes if s.select]
#bpy.ops.object.mode_set(mode='PAINT_GPENCIL') #bpy.ops.object.mode_set(mode='PAINT_GPENCIL')
@ -397,6 +398,7 @@ class GPTB_OT_eraser(Operator):
gp = context.object gp = context.object
matrix = gp.matrix_world matrix = gp.matrix_world
self.gpencil_selectmode_edit = context.scene.tool_settings.gpencil_selectmode_edit
self.radius = self.get_radius(context, event) self.radius = self.get_radius(context, event)
self.mouse_prev = self.mouse = Vector((event.mouse_region_x, event.mouse_region_y)) self.mouse_prev = self.mouse = Vector((event.mouse_region_x, event.mouse_region_y))
self.mouse_path = [(self.mouse_prev, self.radius)] self.mouse_path = [(self.mouse_prev, self.radius)]