diff --git a/CHANGELOG.md b/CHANGELOG.md index a157077..c546a82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/OP_helpers.py b/OP_helpers.py index d5b9d3b..2b367b9 100644 --- a/OP_helpers.py +++ b/OP_helpers.py @@ -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' diff --git a/__init__.py b/__init__.py index b0b9ad1..41c752f 100755 --- a/__init__.py +++ b/__init__.py @@ -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": "",