[Bf-extensions-cvs] [0f6fa464] blender-v3.2-release: Stored Views: Fix error when Lock 'To 3D Cursor' is active

Vladislav noreply at git.blender.org
Wed May 18 13:04:31 CEST 2022


Commit: 0f6fa4644a8b0f677a3550df3203d470a963a818
Author: Vladislav
Date:   Wed May 18 12:56:25 2022 +0200
Branches: blender-v3.2-release
https://developer.blender.org/rBA0f6fa4644a8b0f677a3550df3203d470a963a818

Stored Views: Fix error when Lock 'To 3D Cursor' is active

Cursor is part of scene since 2.80

Fixes T81285.

Maniphest Tasks: T81285

Differential Revision: https://developer.blender.org/D9109

===================================================================

M	space_view3d_stored_views/core.py
M	space_view3d_stored_views/stored_views_test.py

===================================================================

diff --git a/space_view3d_stored_views/core.py b/space_view3d_stored_views/core.py
index 48452fad..0ad0b902 100644
--- a/space_view3d_stored_views/core.py
+++ b/space_view3d_stored_views/core.py
@@ -91,7 +91,7 @@ class POV(StoredView):
         view3d.lock_cursor = stored_view.lock_cursor
         if stored_view.lock_cursor is True:
             # update cursor only if view is locked to cursor
-            view3d.cursor_location = stored_view.cursor_location
+            self.scene.cursor.location = stored_view.cursor_location
 
         if stored_view.perspective == "CAMERA":
 
diff --git a/space_view3d_stored_views/stored_views_test.py b/space_view3d_stored_views/stored_views_test.py
index 845dbe1b..0941ef61 100644
--- a/space_view3d_stored_views/stored_views_test.py
+++ b/space_view3d_stored_views/stored_views_test.py
@@ -148,7 +148,7 @@ class POV(StoredView):
         view3d.lock_cursor = stored_view.lock_cursor
         if stored_view.lock_cursor is True:
             # update cursor only if view is locked to cursor
-            view3d.cursor_location = stored_view.cursor_location
+            self.scene.cursor.location = stored_view.cursor_location
 
         if stored_view.perspective == "CAMERA":



More information about the Bf-extensions-cvs mailing list