[Bf-blender-cvs] [62dd0855a94] master: Cleanup: Remove special handling of 3DCursor in undo code.

Bastien Montagne noreply at git.blender.org
Mon Jan 30 14:42:07 CET 2023


Commit: 62dd0855a94816a23a00aa0705a7f9624c9d4036
Author: Bastien Montagne
Date:   Mon Jan 30 14:40:59 2023 +0100
Branches: master
https://developer.blender.org/rB62dd0855a94816a23a00aa0705a7f9624c9d4036

Cleanup: Remove special handling of 3DCursor in undo code.

Such preserve-across-undo data handling is now done through the IDType
callbacks, see e.g. `scene_undo_preserve` for the 3DCursor case.

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

M	source/blender/blenloader/intern/readfile.cc

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

diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc
index f773f17dc2b..2e1619b4c9f 100644
--- a/source/blender/blenloader/intern/readfile.cc
+++ b/source/blender/blenloader/intern/readfile.cc
@@ -2692,9 +2692,6 @@ void blo_lib_link_restore(Main *oldmain,
     }
     BKE_workspace_active_set(win->workspace_hook, workspace);
 
-    /* keep cursor location through undo */
-    memcpy(&win->scene->cursor, &oldscene->cursor, sizeof(win->scene->cursor));
-
     /* NOTE: even though that function seems to redo part of what is done by
      * `lib_link_workspace_layout_restore()` above, it seems to have a slightly different scope:
      * while the former updates the whole UI pointers from Main db (going over all layouts of



More information about the Bf-blender-cvs mailing list