[Bf-blender-cvs] [6e13062ddb8] soc-2019-openxr: Merge branch 'temp-openxr-ghostxr' into temp-openxr-blenderside
Julian Eisel
noreply at git.blender.org
Mon Mar 9 12:00:44 CET 2020
Commit: 6e13062ddb8835b80f3927a941a1bcbffd9e9530
Author: Julian Eisel
Date: Mon Mar 9 11:55:14 2020 +0100
Branches: soc-2019-openxr
https://developer.blender.org/rB6e13062ddb8835b80f3927a941a1bcbffd9e9530
Merge branch 'temp-openxr-ghostxr' into temp-openxr-blenderside
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/versioning_280.c
index a4e621f7099,e29c4f8658f..7e824da1baa
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -4515,17 -4517,19 +4519,32 @@@ void blo_do_versions_280(FileData *fd,
* \note Keep this message at the bottom of the function.
*/
{
+ /* Keep this block, even when empty. */
+ if (!DNA_struct_elem_find(
+ fd->filesdna, "View3DOverlay", "float", "sculpt_mode_face_sets_opacity")) {
+ for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
+ for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
+ for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *)sl;
+ v3d->overlay.sculpt_mode_face_sets_opacity = 0.0f;
+ }
+ }
+ }
+ }
+ }
++
+ /* Keep this block, even when empty. */
+ if (!DNA_struct_find(fd->filesdna, "bXrSessionSettings")) {
+ for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) {
+ const View3D *v3d_default = DNA_struct_default_get(View3D);
+
+ wm->xr.session_settings.shading_type = OB_SOLID;
+ wm->xr.session_settings.draw_flags = (V3D_OFSDRAW_SHOW_GRIDFLOOR |
+ V3D_OFSDRAW_SHOW_ANNOTATION);
+ wm->xr.session_settings.clip_start = v3d_default->clip_start;
+ wm->xr.session_settings.clip_end = v3d_default->clip_end;
+ }
+ }
}
}
diff --cc source/blender/editors/include/ED_view3d_offscreen.h
index 00000000000,359c55d89a5..f69d8367dca
mode 000000,100644..100644
--- a/source/blender/editors/include/ED_view3d_offscreen.h
+++ b/source/blender/editors/include/ED_view3d_offscreen.h
@@@ -1,0 -1,91 +1,108 @@@
+ /*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ */
+
+ /** \file
+ * \ingroup editors
+ */
+
+ #ifndef __ED_VIEW3D_OFFSCREEN_H__
+ #define __ED_VIEW3D_OFFSCREEN_H__
+
+ #include "DNA_view3d_types.h"
+ #include "DNA_object_enums.h"
+
+ #include "IMB_imbuf_types.h"
+
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+ /* ********* exports for space_view3d/ module for offscreen rendering ********** */
+ struct Depsgraph;
+ struct Scene;
+ struct View3D;
+ struct ARegion;
+ struct GPUOffScreen;
+ struct GPUViewport;
+ struct View3DShading;
+
+ void ED_view3d_draw_offscreen(struct Depsgraph *depsgraph,
+ struct Scene *scene,
+ eDrawType drawtype,
+ struct View3D *v3d,
+ struct ARegion *region,
+ int winx,
+ int winy,
+ float viewmat[4][4],
+ float winmat[4][4],
+ bool do_sky,
+ bool is_persp,
+ const char *viewname,
+ const bool do_color_management,
+ struct GPUOffScreen *ofs,
+ struct GPUViewport *viewport);
++void ED_view3d_draw_offscreen_simple(struct Depsgraph *depsgraph,
++ struct Scene *scene,
++ struct View3DShading *shading_override,
++ int drawtype,
++ int winx,
++ int winy,
++ unsigned int draw_flags,
++ float viewmat[4][4],
++ float winmat[4][4],
++ float clip_start,
++ float clip_end,
++ bool do_sky,
++ bool is_persp,
++ const char *viewname,
++ const bool do_color_management,
++ struct GPUOffScreen *ofs,
++ struct GPUViewport *viewport);
+
+ struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Depsgraph *depsgraph,
+ struct Scene *scene,
+ eDrawType drawtype,
+ struct View3D *v3d,
+ struct ARegion *region,
+ int sizex,
+ int sizey,
+ eImBufFlags imbuf_flag,
+ int alpha_mode,
+ const char *viewname,
+ struct GPUOffScreen *ofs,
+ char err_out[256]);
+ struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(struct Depsgraph *depsgraph,
+ struct Scene *scene,
+ struct View3DShading *shading_override,
+ eDrawType drawtype,
+ struct Object *camera,
+ int width,
+ int height,
+ eImBufFlags imbuf_flags,
+ eV3DOffscreenDrawFlag draw_flags,
+ int alpha_mode,
+ const char *viewname,
+ struct GPUOffScreen *ofs,
+ char err_out[256]);
+
+ #ifdef __cplusplus
+ }
+ #endif
+
+ #endif /* __ED_VIEW3D_H__ */
diff --cc source/blender/makesdna/DNA_view3d_enums.h
index 00000000000,de186700ed1..880a157cc3d
mode 000000,100644..100644
--- a/source/blender/makesdna/DNA_view3d_enums.h
+++ b/source/blender/makesdna/DNA_view3d_enums.h
@@@ -1,0 -1,59 +1,60 @@@
+ /*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ /** \file
+ * \ingroup DNA
+ */
+
+ #ifndef __DNA_VIEW3D_ENUMS_H__
+ #define __DNA_VIEW3D_ENUMS_H__
+
+ /** Settings for offscreen rendering */
+ typedef enum eV3DOffscreenDrawFlag {
+ V3D_OFSDRAW_NONE = (0),
+ V3D_OFSDRAW_SHOW_ANNOTATION = (1 << 0),
+ V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS = (1 << 1),
++ V3D_OFSDRAW_SHOW_GRIDFLOOR = (1 << 2),
+ } eV3DOffscreenDrawFlag;
+
+ /** #View3DShading.light */
+ typedef enum eV3DShadingLightingMode {
+ V3D_LIGHTING_FLAT = 0,
+ V3D_LIGHTING_STUDIO = 1,
+ V3D_LIGHTING_MATCAP = 2,
+ } eV3DShadingLightingMode;
+
+ /** #View3DShading.color_type, #View3DShading.wire_color_type */
+ typedef enum eV3DShadingColorType {
+ V3D_SHADING_MATERIAL_COLOR = 0,
+ V3D_SHADING_RANDOM_COLOR = 1,
+ V3D_SHADING_SINGLE_COLOR = 2,
+ V3D_SHADING_TEXTURE_COLOR = 3,
+ V3D_SHADING_OBJECT_COLOR = 4,
+ V3D_SHADING_VERTEX_COLOR = 5,
+
+ /* Is used to display the object using the error color. For example when in
+ * solid texture paint mode without any textures configured */
+ V3D_SHADING_ERROR_COLOR = 999,
+ } eV3DShadingColorType;
+
+ /** #View3DShading.background_type */
+ typedef enum eV3DShadingBackgroundType {
+ V3D_SHADING_BACKGROUND_THEME = 0,
+ V3D_SHADING_BACKGROUND_WORLD = 1,
+ V3D_SHADING_BACKGROUND_VIEWPORT = 2,
+ } eV3DShadingBackgroundType;
+
+ #endif
diff --cc source/blender/windowmanager/intern/wm_draw.c
index 6dba11ce8cb,9ccff2a3e3d..3dac245c9b1
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@@ -972,12 -963,9 +978,12 @@@ void wm_draw_update(bContext *C
CTX_wm_window_set(C, NULL);
}
}
+
+ /* Draw non-windows (surfaces) */
+ wm_surfaces_iter(C, wm_draw_surface);
}
- void wm_draw_region_clear(wmWindow *win, ARegion *UNUSED(ar))
+ void wm_draw_region_clear(wmWindow *win, ARegion *UNUSED(region))
{
bScreen *screen = WM_window_get_active_screen(win);
screen->do_draw = true;
diff --cc source/blender/windowmanager/intern/wm_xr.c
index a3a0b692ac5,00000000000..5601da740fd
mode 100644,000000..100644
--- a/source/blender/windowmanager/intern/wm_xr.c
+++ b/source/blender/windowmanager/intern/wm_xr.c
@@@ -1,477 -1,0 +1,478 @@@
+/*
+ * This program is free software; you
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list