Fix #9 Draw cam overlay breking after undo
4.1.2 - fixed: Error in Draw cam overlay breaking after random undo step `Ctrl + Z` use viewlayer viewport hide instead of object hide_viewport, otherwise transform seem to not be evaluated correctly
This commit is contained in:
parent
34f8193c7b
commit
3624f5cabd
@ -1,6 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
|
||||
4.1.2
|
||||
|
||||
- fixed: Error in Draw cam overlay breaking after random undo step `Ctrl + Z`
|
||||
|
||||
4.1.1
|
||||
|
||||
- added: option in copy stroke world space to not bake move
|
||||
|
@ -212,9 +212,14 @@ class GPTB_OT_draw_cam(Operator):
|
||||
# Swap to it, unhide if necessary and hide previous
|
||||
context.scene.camera = maincam
|
||||
|
||||
## hide cam object
|
||||
drawcam.hide_viewport = True
|
||||
## Hide cam object
|
||||
|
||||
# Ensure at lviewport viz is active to ensure visibility and refresh state
|
||||
maincam.hide_viewport = False
|
||||
# drawcam.hide_viewport = False # Not absolutely needed
|
||||
|
||||
drawcam.hide_set(True)
|
||||
maincam.hide_set(False)
|
||||
|
||||
## if in main camera GO to drawcam
|
||||
elif context.scene.camera.name not in ('draw_cam', 'obj_cam'):
|
||||
@ -267,8 +272,12 @@ class GPTB_OT_draw_cam(Operator):
|
||||
|
||||
## hide cam object
|
||||
context.scene.camera = drawcam
|
||||
# Ensure viewport viz is active to ensure visibility and refresh state
|
||||
drawcam.hide_viewport = False
|
||||
maincam.hide_viewport = True
|
||||
maincam.hide_viewport = False
|
||||
## Set viewlayer visibility
|
||||
drawcam.hide_set(False)
|
||||
maincam.hide_set(True)
|
||||
|
||||
if created and drawcam.name == 'obj_cam': # Go in camera view
|
||||
context.region_data.view_perspective = 'CAMERA'
|
||||
|
@ -4,7 +4,7 @@ bl_info = {
|
||||
"name": "GP toolbox",
|
||||
"description": "Tool set for Grease Pencil in animation production",
|
||||
"author": "Samuel Bernou, Christophe Seux",
|
||||
"version": (4, 1, 1),
|
||||
"version": (4, 1, 2),
|
||||
"blender": (4, 3, 0),
|
||||
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
||||
"warning": "",
|
||||
|
Loading…
x
Reference in New Issue
Block a user