[Bf-blender-cvs] [fcc6e94897a] soc-2019-openxr: Merge branch 'temp-openxr-ghostxr' into temp-openxr-blenderside
Julian Eisel
noreply at git.blender.org
Mon Jan 6 16:53:00 CET 2020
Commit: fcc6e94897a6891c73be00ac2cdfa268e95a3e4e
Author: Julian Eisel
Date: Mon Jan 6 14:59:25 2020 +0100
Branches: soc-2019-openxr
https://developer.blender.org/rBfcc6e94897a6891c73be00ac2cdfa268e95a3e4e
Merge branch 'temp-openxr-ghostxr' into temp-openxr-blenderside
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/versioning_280.c
index 49d3726a224,bf53d6f216b..5e7a3a794b8
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -3980,18 -4197,131 +4199,145 @@@ void blo_do_versions_280(FileData *fd,
}
}
+ /* Cloth pressure */
+ for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
+ for (ModifierData *md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Cloth) {
+ ClothModifierData *clmd = (ClothModifierData *)md;
+
+ clmd->sim_parms->pressure_factor = 1;
+ }
+ }
+ }
+ }
+
+ if (!MAIN_VERSION_ATLEAST(bmain, 282, 3)) {
+ /* Remove Unified pressure/size and pressure/alpha */
+ for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
+ ToolSettings *ts = scene->toolsettings;
+ UnifiedPaintSettings *ups = &ts->unified_paint_settings;
+ ups->flag &= ~(UNIFIED_PAINT_FLAG_UNUSED_0 | UNIFIED_PAINT_FLAG_UNUSED_1);
+ }
+
+ /* Set the default render pass in the viewport to Combined. */
+ if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "int", "render_pass")) {
+ for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
+ scene->display.shading.render_pass = SCE_PASS_COMBINED;
+ }
+
+ 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->shading.render_pass = SCE_PASS_COMBINED;
+ }
+ }
+ }
+ }
+ }
+
+ /* Make markers region visible by default. */
+ for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
+ for (ScrArea *area = screen->areabase.first; area; area = area->next) {
+ for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) {
+ switch (sl->spacetype) {
+ case SPACE_SEQ: {
+ SpaceSeq *sseq = (SpaceSeq *)sl;
+ sseq->flag |= SEQ_SHOW_MARKERS;
+ break;
+ }
+ case SPACE_ACTION: {
+ SpaceAction *saction = (SpaceAction *)sl;
+ saction->flag |= SACTION_SHOW_MARKERS;
+ break;
+ }
+ case SPACE_GRAPH: {
+ SpaceGraph *sipo = (SpaceGraph *)sl;
+ sipo->flag |= SIPO_SHOW_MARKERS;
+ break;
+ }
+ case SPACE_NLA: {
+ SpaceNla *snla = (SpaceNla *)sl;
+ snla->flag |= SNLA_SHOW_MARKERS;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Versioning code until next subversion bump goes here.
+ *
+ * \note Be sure to check when bumping the version:
+ * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend
+ * - "versioning_userdef.c", #do_versions_theme
+ *
+ * \note Keep this message at the bottom of the function.
+ */
+ {
+ /* Keep this block, even when empty. */
+
+ /* Cloth internal springs */
+ for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
+ for (ModifierData *md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Cloth) {
+ ClothModifierData *clmd = (ClothModifierData *)md;
+
+ clmd->sim_parms->internal_tension = 15.0f;
+ clmd->sim_parms->max_internal_tension = 15.0f;
+ clmd->sim_parms->internal_compression = 15.0f;
+ clmd->sim_parms->max_internal_compression = 15.0f;
+ clmd->sim_parms->internal_spring_max_diversion = M_PI / 4.0f;
+ }
+ }
+ }
+
+ /* Add primary tile to images. */
+ if (!DNA_struct_elem_find(fd->filesdna, "Image", "ListBase", "tiles")) {
+ for (Image *ima = bmain->images.first; ima; ima = ima->id.next) {
+ ImageTile *tile = MEM_callocN(sizeof(ImageTile), "Image Tile");
+ tile->ok = 1;
+ tile->tile_number = 1001;
+ BLI_addtail(&ima->tiles, tile);
+ }
+ }
+
+ /* UDIM Image Editor change. */
+ if (!DNA_struct_elem_find(fd->filesdna, "SpaceImage", "int", "tile_grid_shape[2]")) {
+ 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_IMAGE) {
+ SpaceImage *sima = (SpaceImage *)sl;
+ sima->tile_grid_shape[0] = 1;
+ sima->tile_grid_shape[1] = 1;
+ }
+ }
+ }
+ }
+ }
+
+ /* Brush cursor alpha */
+ for (Brush *br = bmain->brushes.first; br; br = br->id.next) {
+ br->add_col[3] = 0.9f;
+ br->sub_col[3] = 0.9f;
+ }
++
+#ifdef WITH_OPENXR
+ 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;
+ }
+ }
+#endif
}
}
More information about the Bf-blender-cvs
mailing list