From d322bf5bf5eac2641f7783fca004ba4465ea6cde Mon Sep 17 00:00:00 2001 From: mmmrqs Date: Sun, 12 Sep 2021 11:42:25 -0300 Subject: [PATCH] 1.0.1: Fixed issue re memory slots switching --- addon/reference_cameras.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/addon/reference_cameras.py b/addon/reference_cameras.py index 6fdf035..53f3497 100644 --- a/addon/reference_cameras.py +++ b/addon/reference_cameras.py @@ -24,7 +24,7 @@ "name": "Reference Cameras", "description": "Handles cameras associated with reference photos", "author": "Marcelo M. Marques (fork of Witold Jaworski's project)", - "version": (1, 0, 0), + "version": (1, 0, 1), "blender": (2, 80, 75), "location": "View3D > side panel ([N]), [Cameras] tab", "support": "COMMUNITY", @@ -36,7 +36,9 @@ #--- ### Change log -#v2.1.0 (08.01.2021) - by Marcelo M. Marques +#v1.0.1 (09.12.2021) - by Marcelo M. Marques +#Fixed: Saved the current camera state to prevent impact by the depsgraph_update_post's after_update() function +#v1.0.0 (09.01.2021) - by Marcelo M. Marques #Added: Addon preferences with properties to customize most of the panel's features. #Added: Group of buttons to set the transformation orientation and select the camera/target. #Added: Button to blink the active meshe(s) by continuously turning visibility on or off. @@ -730,6 +732,8 @@ def execute(self, context): return {'FINISHED'} def switch_memory_data(slot=0): + global LastState + scn = bpy.context.scene camera = scn.camera target = get_target(camera) @@ -759,6 +763,9 @@ def switch_memory_data(slot=0): target.location = backup_slot.TargetLocation target.rotation_euler = backup_slot.TargetRotation + # Finally save the current state to prevent impact by the depsgraph_update_post's after_update() function + LastState = (camera.name, camera.data.lens) + class RefCameraPanelbutton_M1(bpy.types.Operator): bl_idname = "object.ref_camera_panelbutton_m1" bl_label = "M1"