GPencil Tools: fix scrub in multiframe display
Multiframe is now disabled while scrubbing viewport-timeline. (like normal scrubbing does)
This commit is contained in:
parent
35d5df9bf4
commit
dd01ddbe34
|
@ -21,7 +21,7 @@ bl_info = {
|
|||
"name": "Grease Pencil Tools",
|
||||
"description": "Extra tools for Grease Pencil",
|
||||
"author": "Samuel Bernou, Antonio Vazquez, Daniel Martinez Lara, Matias Mendiola",
|
||||
"version": (1, 3, 0),
|
||||
"version": (1, 3, 1),
|
||||
"blender": (2, 91, 0),
|
||||
"location": "Sidebar > Grease Pencil > Grease Pencil Tools",
|
||||
"warning": "",
|
||||
|
|
|
@ -201,9 +201,15 @@ class GPTS_OT_time_scrub(bpy.types.Operator):
|
|||
# Disable Onion skin
|
||||
self.active_space_data = context.space_data
|
||||
self.onion_skin = None
|
||||
self.multi_frame = None
|
||||
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.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
|
||||
if not self.hud:
|
||||
|
@ -358,7 +364,8 @@ class GPTS_OT_time_scrub(bpy.types.Operator):
|
|||
def _exit_modal(self, context):
|
||||
if self.onion_skin is not None:
|
||||
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:
|
||||
self.viewtype.draw_handler_remove(self._handle, self.spacetype)
|
||||
context.area.tag_redraw()
|
||||
|
|
Loading…
Reference in New Issue