Skip to content
Snippets Groups Projects
Commit dd01ddbe authored by Pullusb's avatar Pullusb
Browse files

GPencil Tools: fix scrub in multiframe display

Multiframe is now disabled while scrubbing viewport-timeline. (like normal scrubbing does)
parent 35d5df9b
No related branches found
Tags
No related merge requests found
...@@ -21,7 +21,7 @@ bl_info = { ...@@ -21,7 +21,7 @@ bl_info = {
"name": "Grease Pencil Tools", "name": "Grease Pencil Tools",
"description": "Extra tools for Grease Pencil", "description": "Extra tools for Grease Pencil",
"author": "Samuel Bernou, Antonio Vazquez, Daniel Martinez Lara, Matias Mendiola", "author": "Samuel Bernou, Antonio Vazquez, Daniel Martinez Lara, Matias Mendiola",
"version": (1, 3, 0), "version": (1, 3, 1),
"blender": (2, 91, 0), "blender": (2, 91, 0),
"location": "Sidebar > Grease Pencil > Grease Pencil Tools", "location": "Sidebar > Grease Pencil > Grease Pencil Tools",
"warning": "", "warning": "",
......
...@@ -201,9 +201,15 @@ class GPTS_OT_time_scrub(bpy.types.Operator): ...@@ -201,9 +201,15 @@ class GPTS_OT_time_scrub(bpy.types.Operator):
# Disable Onion skin # Disable Onion skin
self.active_space_data = context.space_data self.active_space_data = context.space_data
self.onion_skin = None self.onion_skin = None
self.multi_frame = None
if context.space_data.type == 'VIEW_3D': # and 'GPENCIL' in context.mode if context.space_data.type == 'VIEW_3D': # and 'GPENCIL' in context.mode
self.onion_skin = self.active_space_data.overlay.use_gpencil_onion_skin self.onion_skin = self.active_space_data.overlay.use_gpencil_onion_skin
self.active_space_data.overlay.use_gpencil_onion_skin = False self.active_space_data.overlay.use_gpencil_onion_skin = False
if ob and ob.type == 'GPENCIL':
if ob.data.use_multiedit:
self.multi_frame = ob.data.use_multiedit
ob.data.use_multiedit = False
self.hud = prefs.use_hud self.hud = prefs.use_hud
if not self.hud: if not self.hud:
...@@ -358,7 +364,8 @@ class GPTS_OT_time_scrub(bpy.types.Operator): ...@@ -358,7 +364,8 @@ class GPTS_OT_time_scrub(bpy.types.Operator):
def _exit_modal(self, context): def _exit_modal(self, context):
if self.onion_skin is not None: if self.onion_skin is not None:
self.active_space_data.overlay.use_gpencil_onion_skin = self.onion_skin self.active_space_data.overlay.use_gpencil_onion_skin = self.onion_skin
if self.multi_frame:
context.object.data.use_multiedit = self.multi_frame
if self.hud and self.viewtype: if self.hud and self.viewtype:
self.viewtype.draw_handler_remove(self._handle, self.spacetype) self.viewtype.draw_handler_remove(self._handle, self.spacetype)
context.area.tag_redraw() context.area.tag_redraw()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment