Fix brush radius

gpv2
Christophe SEUX 2021-06-17 16:22:44 +02:00
parent 2efbb36ddf
commit beba17fe2f
2 changed files with 4 additions and 5 deletions

View File

@ -326,9 +326,8 @@ class GPTB_OT_eraser(Operator):
#print('subdivide', time() - t3) #print('subdivide', time() - t3)
bpy.ops.gpencil.select_all(action='DESELECT') bpy.ops.gpencil.select_all(action='DESELECT')
bpy.ops.gpencil.select_circle(x=x, y=y, radius=radius-4, wait_for_input=False) bpy.ops.gpencil.select_circle(x=x, y=y, radius=radius, wait_for_input=False)
''' '''
selected_strokes = [s for f in self.gp_frames for s in f.strokes if s.select] selected_strokes = [s for f in self.gp_frames for s in f.strokes if s.select]
@ -371,8 +370,8 @@ class GPTB_OT_eraser(Operator):
if event.type == 'LEFTMOUSE': if event.type == 'LEFTMOUSE':
#self.mouse = mouse #self.mouse = mouse
self.mouse_path.append((self.mouse, self.radius)) #self.mouse_path.append((self.mouse, self.radius))
#self.erase(context, event) self.erase(context, event)
bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW') bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
return {'FINISHED'} return {'FINISHED'}

View File

@ -79,7 +79,7 @@ class GP_PG_FixSettings(bpy.types.PropertyGroup):
class GP_PG_ToolsSettings(bpy.types.PropertyGroup): class GP_PG_ToolsSettings(bpy.types.PropertyGroup):
eraser_radius : IntProperty( eraser_radius : IntProperty(
name="Tint hue offset", description="Radius of eraser brush", name="Eraser Radius", description="Radius of eraser brush",
default=20, min=0, max=500, subtype='PIXEL') default=20, min=0, max=500, subtype='PIXEL')
drawcam_passepartout : BoolProperty( drawcam_passepartout : BoolProperty(