Add Eraser Tool
1.5.0 - feat: Eraser Brush Tool (Need to be enable in the preferences)
This commit is contained in:
+26
-3
@@ -14,8 +14,8 @@
|
||||
bl_info = {
|
||||
"name": "GP toolbox",
|
||||
"description": "Set of tools for Grease Pencil in animation production",
|
||||
"author": "Samuel Bernou",
|
||||
"version": (1, 4, 3),
|
||||
"author": "Samuel Bernou, Christophe Seux",
|
||||
"version": (1, 5, 0),
|
||||
"blender": (2, 91, 0),
|
||||
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
||||
"warning": "",
|
||||
@@ -48,6 +48,8 @@ from . import OP_copy_paste
|
||||
from . import OP_realign
|
||||
from . import OP_depth_move
|
||||
from . import OP_key_duplicate_send
|
||||
from . import OP_eraser_brush
|
||||
from . import TOOL_eraser_brush
|
||||
from . import handler_draw_cam
|
||||
from . import keymaps
|
||||
|
||||
@@ -97,9 +99,23 @@ def remap_on_save_update(self, context):
|
||||
if 'remap_relative' in [hand.__name__ for hand in bpy.app.handlers.save_pre]:
|
||||
bpy.app.handlers.save_pre.remove(remap_relative)
|
||||
|
||||
|
||||
|
||||
def update_use_precise_eraser(self, context):
|
||||
|
||||
km, kmi = TOOL_eraser_brush.addon_keymaps[0]
|
||||
|
||||
kmi.active = self.use_precise_eraser
|
||||
|
||||
|
||||
class GPTB_prefs(bpy.types.AddonPreferences):
|
||||
bl_idname = __name__
|
||||
|
||||
use_precise_eraser : BoolProperty(
|
||||
name='Precise Eraser',
|
||||
default=False,
|
||||
update=update_use_precise_eraser
|
||||
)
|
||||
## tabs
|
||||
|
||||
pref_tabs : EnumProperty(
|
||||
@@ -335,7 +351,7 @@ class GPTB_prefs(bpy.types.AddonPreferences):
|
||||
|
||||
# box.separator()## Keyframe jumper
|
||||
box = layout.box()
|
||||
box.label(text='Keyframe Jump option:')
|
||||
box.label(text='Keyframe Jump options:')
|
||||
|
||||
box.prop(self, "kfj_use_shortcut", text='Bind shortcuts')
|
||||
if self.kfj_use_shortcut:
|
||||
@@ -381,6 +397,9 @@ class GPTB_prefs(bpy.types.AddonPreferences):
|
||||
box.label(text='Random color options:')
|
||||
box.prop(self, 'separator')
|
||||
|
||||
box = layout.box()
|
||||
box.label(text='Tools options:')
|
||||
box.prop(self, 'use_precise_eraser')
|
||||
|
||||
if self.pref_tabs == 'MAN_OPS':
|
||||
# layout.separator()## notes
|
||||
@@ -457,6 +476,8 @@ def register():
|
||||
OP_realign.register()
|
||||
OP_depth_move.register()
|
||||
OP_key_duplicate_send.register()
|
||||
OP_eraser_brush.register()
|
||||
TOOL_eraser_brush.register()
|
||||
handler_draw_cam.register()
|
||||
UI_tools.register()
|
||||
keymaps.register()
|
||||
@@ -480,6 +501,8 @@ def unregister():
|
||||
bpy.utils.unregister_class(cls)
|
||||
UI_tools.unregister()
|
||||
handler_draw_cam.unregister()
|
||||
OP_eraser_brush.unregister()
|
||||
TOOL_eraser_brush.unregister()
|
||||
OP_key_duplicate_send.unregister()
|
||||
OP_depth_move.unregister()
|
||||
OP_realign.unregister()
|
||||
|
||||
Reference in New Issue
Block a user