Commit: c8c782fbf4564a3bd5bd2e3c5037515650f4e72e
Author: Peter Kim
Date:   Tue Aug 31 17:42:55 2021 +0900
Branches: xr-controller-support
https://developer.blender.org/rBc8c782fbf4564a3bd5bd2e3c5037515650f4e72e

Cleanup: remove unused struct member, null checks

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

M       source/blender/blenloader/intern/readfile.c
M       source/blender/windowmanager/intern/wm.c
M       source/blender/windowmanager/xr/intern/wm_xr_intern.h

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

diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index 459586d8c10..c40449f7242 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2484,9 +2484,7 @@ static void lib_link_wm_xr_data_restore(struct 
IDNameLib_Map *id_map, wmXrData *
       id_map, (ID *)xr_data->session_settings.base_pose_object, USER_REAL);
 
   LISTBASE_FOREACH (XrMotionCaptureObject *, mocap_ob, 
&xr_data->session_settings.mocap_objects) {
-    if (mocap_ob->ob) {
-      mocap_ob->ob = restore_pointer_by_name(id_map, (ID *)mocap_ob->ob, 
USER_REAL);
-    }
+    mocap_ob->ob = restore_pointer_by_name(id_map, (ID *)mocap_ob->ob, 
USER_REAL);
   }
 }
 
diff --git a/source/blender/windowmanager/intern/wm.c 
b/source/blender/windowmanager/intern/wm.c
index cea2a0c45a3..d2d497439ae 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -288,9 +288,7 @@ static void lib_link_wm_xr_data(BlendLibReader *reader, ID 
*parent_id, wmXrData
   BLO_read_id_address(reader, parent_id->lib, 
&xr_data->session_settings.base_pose_object);
 
   LISTBASE_FOREACH (XrMotionCaptureObject *, mocap_ob, 
&xr_data->session_settings.mocap_objects) {
-    if (mocap_ob->ob) {
-      BLO_read_id_address(reader, parent_id->lib, &mocap_ob->ob);
-    }
+    BLO_read_id_address(reader, parent_id->lib, &mocap_ob->ob);
   }
 }
 
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_intern.h 
b/source/blender/windowmanager/xr/intern/wm_xr_intern.h
index 392d5fe63a9..6fce270643f 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr_intern.h
+++ b/source/blender/windowmanager/xr/intern/wm_xr_intern.h
@@ -26,8 +26,17 @@
 
 #include "wm_xr.h"
 
+struct ARegion;
+struct ARegionType;
+struct bContext;
 struct bScreen;
+struct Depsgraph;
 struct GPUBatch;
+struct GPUOffScreen;
+struct GPUViewport;
+struct Scene;
+struct ViewLayer;
+struct wmOperatorType;
 struct wmXrActionSet;
 
 typedef struct wmXrSessionState {
@@ -84,10 +93,6 @@ typedef struct wmXrSessionState {
 typedef struct wmXrRuntimeData {
   GHOST_XrContextHandle context;
 
-  /** The context the session was started in. Stored to execute Python handlers
-   * for "xr_session_start_pre". Afterwards, this may be an invalid reference. 
*/
-  struct bContext *bcontext;
-
   /** The window the session was started in. Stored to be able to follow its 
view-layer. This may
    * be an invalid reference, i.e. the window may have been closed. */
   wmWindow *session_root_win;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to