Commit: f5ff515085156c25b0d8cb6ad085a8234f11c13e
Author: Peter Kim
Date:   Fri Nov 6 21:40:58 2020 +0900
Branches: xr-actions-D9124
https://developer.blender.org/rBf5ff515085156c25b0d8cb6ad085a8234f11c13e

Merge branch 'master' into xr-actions-D9124

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



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

diff --cc source/blender/blenloader/intern/readfile.c
index 52148444bc9,f7ae7e1e2a2..6e29d919646
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -4567,132 -4526,6 +4526,9 @@@ static void direct_link_scene(BlendData
  /** \} */
  
  /* -------------------------------------------------------------------- */
- /** \name XR-data
-  * \{ */
- 
- static void direct_link_wm_xr_data(BlendDataReader *reader, wmXrData *xr_data)
- {
-   BKE_screen_view3d_shading_blend_read_data(reader, 
&xr_data->session_settings.shading);
- }
- 
- static void lib_link_wm_xr_data(BlendLibReader *reader, ID *parent_id, 
wmXrData *xr_data)
- {
-   BLO_read_id_address(reader, parent_id->lib, 
&xr_data->session_settings.base_pose_object);
 +  BLO_read_id_address(reader, parent_id->lib, 
&xr_data->session_settings.headset_object);
 +  BLO_read_id_address(reader, parent_id->lib, 
&xr_data->session_settings.controller0_object);
 +  BLO_read_id_address(reader, parent_id->lib, 
&xr_data->session_settings.controller1_object);
- }
- 
- /** \} */
- 
- /* -------------------------------------------------------------------- */
- /** \name Read ID: Window Manager
-  * \{ */
- 
- static void direct_link_windowmanager(BlendDataReader *reader, 
wmWindowManager *wm)
- {
-   id_us_ensure_real(&wm->id);
-   BLO_read_list(reader, &wm->windows);
- 
-   LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
-     BLO_read_data_address(reader, &win->parent);
- 
-     WorkSpaceInstanceHook *hook = win->workspace_hook;
-     BLO_read_data_address(reader, &win->workspace_hook);
- 
-     /* This will be NULL for any pre-2.80 blend file. */
-     if (win->workspace_hook != NULL) {
-       /* We need to restore a pointer to this later when reading workspaces,
-        * so store in global oldnew-map.
-        * Note that this is only needed for versioning of older .blend files 
now.. */
-       oldnewmap_insert(reader->fd->globmap, hook, win->workspace_hook, 0);
-       /* Cleanup pointers to data outside of this data-block scope. */
-       win->workspace_hook->act_layout = NULL;
-       win->workspace_hook->temp_workspace_store = NULL;
-       win->workspace_hook->temp_layout_store = NULL;
-     }
- 
-     BKE_screen_area_map_blend_read_data(reader, &win->global_areas);
- 
-     win->ghostwin = NULL;
-     win->gpuctx = NULL;
-     win->eventstate = NULL;
-     win->cursor_keymap_status = NULL;
-     win->tweak = NULL;
- #ifdef WIN32
-     win->ime_data = NULL;
- #endif
- 
-     BLI_listbase_clear(&win->queue);
-     BLI_listbase_clear(&win->handlers);
-     BLI_listbase_clear(&win->modalhandlers);
-     BLI_listbase_clear(&win->gesture);
- 
-     win->active = 0;
- 
-     win->cursor = 0;
-     win->lastcursor = 0;
-     win->modalcursor = 0;
-     win->grabcursor = 0;
-     win->addmousemove = true;
-     BLO_read_data_address(reader, &win->stereo3d_format);
- 
-     /* Multi-view always fallback to anaglyph at file opening
-      * otherwise quad-buffer saved files can break Blender. */
-     if (win->stereo3d_format) {
-       win->stereo3d_format->display_mode = S3D_DISPLAY_ANAGLYPH;
-     }
-   }
- 
-   direct_link_wm_xr_data(reader, &wm->xr);
- 
-   BLI_listbase_clear(&wm->timers);
-   BLI_listbase_clear(&wm->operators);
-   BLI_listbase_clear(&wm->paintcursors);
-   BLI_listbase_clear(&wm->queue);
-   BKE_reports_init(&wm->reports, RPT_STORE);
- 
-   BLI_listbase_clear(&wm->keyconfigs);
-   wm->defaultconf = NULL;
-   wm->addonconf = NULL;
-   wm->userconf = NULL;
-   wm->undo_stack = NULL;
- 
-   wm->message_bus = NULL;
- 
-   wm->xr.runtime = NULL;
- 
-   BLI_listbase_clear(&wm->jobs);
-   BLI_listbase_clear(&wm->drags);
- 
-   wm->windrawable = NULL;
-   wm->winactive = NULL;
-   wm->initialized = 0;
-   wm->op_undo_depth = 0;
-   wm->is_interface_locked = 0;
- }
- 
- static void lib_link_windowmanager(BlendLibReader *reader, wmWindowManager 
*wm)
- {
-   LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
-     if (win->workspace_hook) { /* NULL for old files */
-       lib_link_workspace_instance_hook(reader, win->workspace_hook, &wm->id);
-     }
-     BLO_read_id_address(reader, wm->id.lib, &win->scene);
-     /* deprecated, but needed for versioning (will be NULL'ed then) */
-     BLO_read_id_address(reader, NULL, &win->screen);
- 
-     LISTBASE_FOREACH (ScrArea *, area, &win->global_areas.areabase) {
-       BKE_screen_area_blend_read_lib(reader, &wm->id, area);
-     }
- 
-     lib_link_wm_xr_data(reader, &wm->id, &wm->xr);
-   }
- }
- 
- /** \} */
- 
- /* -------------------------------------------------------------------- */
  /** \name Read ID: Screen
   * \{ */
  
diff --cc source/blender/editors/space_api/spacetypes.c
index e1783358158,10ce7b81954..652d1c08453
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@@ -268,33 -268,20 +268,30 @@@ void ED_region_draw_cb_exit(ARegionTyp
    }
  }
  
 -void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
 +static void ed_region_draw_cb_draw(const bContext *C, ARegion *region, 
ARegionType *art, int type)
  {
    RegionDrawCB *rdc;
-   bool has_drawn_something = false;
  
 -  for (rdc = region->type->drawcalls.first; rdc; rdc = rdc->next) {
 +  for (rdc = art->drawcalls.first; rdc; rdc = rdc->next) {
      if (rdc->type == type) {
        rdc->draw(C, region, rdc->customdata);
-       has_drawn_something = true;
+ 
+       /* This is needed until we get rid of BGL which can change the states 
we are tracking. */
+       GPU_bgl_end();
      }
    }
-   if (has_drawn_something) {
-     /* This is needed until we get rid of BGL which can change the states we 
are tracking. */
-     GPU_bgl_end();
-   }
  }
  
 +void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
 +{
 +  ed_region_draw_cb_draw(C, region, region->type, type);
 +}
 +
 +void ED_region_surface_draw_cb_draw(ARegionType *art, int type)
 +{
 +  ed_region_draw_cb_draw(NULL, NULL, art, type);
 +}
 +
  /* ********************* space template *********************** */
  /* forward declare */
  void ED_spacetype_xxx(void);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to