Commit: a79b731edcfc4b22b3d56855f82bfda9023c851d
Author: Julian Eisel
Date: Wed Mar 11 20:25:20 2020 +0100
Branches: vr_scene_inspection
https://developer.blender.org/rBa79b731edcfc4b22b3d56855f82bfda9023c851d
Fix possible error with base pose object on undo or Load UI disabled
===================================================================
M source/blender/blenloader/intern/readfile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c
b/source/blender/blenloader/intern/readfile.c
index 65962702219..8a68be141f7 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7859,6 +7859,12 @@ static void lib_link_main_data_restore(struct
IDNameLib_Map *id_map, Main *newma
FOREACH_MAIN_ID_END;
}
+static void lib_link_wm_xr_data_restore(struct IDNameLib_Map *id_map, wmXrData
*xr_data)
+{
+ xr_data->session_settings.base_pose_object = restore_pointer_by_name(
+ id_map, (ID *)xr_data->session_settings.base_pose_object, USER_REAL);
+}
+
static void lib_link_window_scene_data_restore(wmWindow *win, Scene *scene,
ViewLayer *view_layer)
{
bScreen *screen = BKE_workspace_active_screen_get(win->workspace_hook);
@@ -8189,6 +8195,8 @@ void blo_lib_link_restore(Main *oldmain,
BLI_assert(win->screen == NULL);
}
+ lib_link_wm_xr_data_restore(id_map, &curwm->xr);
+
/* Restore all ID pointers in Main database itself
* (especially IDProperties might point to some word-space of other 'weirdly
unchanged' ID
* pointers, see T69146).
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs