Commit: adbccae4b48acdf58d8b715be660ba522a5dfad6
Author: Bastien Montagne
Date: Mon Jul 23 17:52:52 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBadbccae4b48acdf58d8b715be660ba522a5dfad6
Merge branch 'master' into blender2.8
Note: Moved doversion of VSE strips uniquename to 2.8 versionning area,
and raised accordingly current file subversion, since that bug also
affected previous 2.8 .blend files...
Conflicts:
source/blender/blenkernel/BKE_blender_version.h
===================================================================
===================================================================
diff --cc source/blender/blenkernel/BKE_blender_version.h
index 8707fe3e11b,16115203294..79ae904c73d
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@@ -27,11 -27,11 +27,11 @@@
/* these lines are grep'd, watch out for our not-so-awesome regex
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
-#define BLENDER_VERSION 279
-#define BLENDER_SUBVERSION 6
-/* Several breakages with 270, e.g. constraint deg vs rad */
-#define BLENDER_MINVERSION 270
-#define BLENDER_MINSUBVERSION 6
+#define BLENDER_VERSION 280
- #define BLENDER_SUBVERSION 20
++#define BLENDER_SUBVERSION 21
+/* Several breakages with 280, e.g. collections vs layers */
+#define BLENDER_MINVERSION 280
+#define BLENDER_MINSUBVERSION 0
/* used by packaging tools */
/* can be left blank, otherwise a,b,c... etc with no quotes */
diff --cc source/blender/blenloader/intern/versioning_250.c
index 973591c49da,28720ef5145..4b628bf816a
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@@ -1028,11 -1309,9 +1014,7 @@@ void blo_do_versions_250(FileData *fd,
while (sce) {
if (sce->r.frame_step == 0)
sce->r.frame_step = 1;
- if (sce->r.mblur_samples == 0)
- sce->r.mblur_samples = sce->r.osa;
- if (sce->ed && sce->ed->seqbase.first) {
-
do_versions_seq_unique_name_all_strips(sce, &sce->ed->seqbase);
- }
-
sce = sce->id.next;
}
}
diff --cc source/blender/blenloader/intern/versioning_280.c
index 6ac7c719952,00000000000..79ae95e96e4
mode 100644,000000..100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -1,1623 -1,0 +1,1644 @@@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * 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.
+ *
+ * Contributor(s): Dalai Felinto
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/** \file blender/blenloader/intern/versioning_280.c
+ * \ingroup blenloader
+ */
+
+/* allow readfile to use deprecated functionality */
+#define DNA_DEPRECATED_ALLOW
+
+#include <string.h>
+#include <float.h>
+
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+#include "BLI_mempool.h"
+#include "BLI_string.h"
+#include "BLI_string_utf8.h"
+#include "BLI_utildefines.h"
+
+#include "DNA_object_types.h"
+#include "DNA_camera_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_gpu_types.h"
+#include "DNA_group_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_layer_types.h"
+#include "DNA_lightprobe_types.h"
+#include "DNA_material_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_particle_types.h"
+#include "DNA_rigidbody_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_view3d_types.h"
+#include "DNA_genfile.h"
+#include "DNA_workspace_types.h"
+
+#include "BKE_collection.h"
+#include "BKE_constraint.h"
+#include "BKE_customdata.h"
+#include "BKE_freestyle.h"
+#include "BKE_idprop.h"
+#include "BKE_image.h"
+#include "BKE_layer.h"
+#include "BKE_main.h"
+#include "BKE_mesh.h"
+#include "BKE_node.h"
+#include "BKE_pointcache.h"
+#include "BKE_report.h"
+#include "BKE_scene.h"
+#include "BKE_screen.h"
+#include "BKE_studiolight.h"
+#include "BKE_workspace.h"
+
+#include "BLO_readfile.h"
+#include "readfile.h"
+
+#include "MEM_guardedalloc.h"
+
+static bScreen *screen_parent_find(const bScreen *screen)
+{
+ /* can avoid lookup if screen state isn't maximized/full (parent and
child store the same state) */
+ if (ELEM(screen->state, SCREENMAXIMIZED, SCREENFULL)) {
+ for (const ScrArea *sa = screen->areabase.first; sa; sa =
sa->next) {
+ if (sa->full && sa->full != screen) {
+ BLI_assert(sa->full->state == screen->state);
+ return sa->full;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+static void do_version_workspaces_create_from_screens(Main *bmain)
+{
+ for (bScreen *screen = bmain->screen.first; screen; screen =
screen->id.next) {
+ const bScreen *screen_parent = screen_parent_find(screen);
+ WorkSpace *workspace;
+ if (screen->temp) {
+ continue;
+ }
+
+ if (screen_parent) {
+ /* fullscreen with "Back to Previous" option, don't
create
+ * a new workspace, add layout workspace containing
parent */
+ workspace = BLI_findstring(
+ &bmain->workspaces, screen_parent->id.name + 2,
offsetof(ID, name) + 2);
+ }
+ else {
+ workspace = BKE_workspace_add(bmain, screen->id.name +
2);
+ }
+ BKE_workspace_layout_add(bmain, workspace, screen,
screen->id.name + 2);
+ }
+}
+
+static void do_version_area_change_space_to_space_action(ScrArea *area, const
Scene *scene)
+{
+ SpaceType *stype = BKE_spacetype_from_id(SPACE_ACTION);
+ SpaceAction *saction = (SpaceAction *)stype->new(area, scene);
+ ARegion *region_channels;
+
+ /* Properly free current regions */
+ for (ARegion *region = area->regionbase.first; region; region =
region->next) {
+ BKE_area_region_free(area->type, region);
+ }
+ BLI_freelistN(&area->regionbase);
+
+ area->type = stype;
+ area->spacetype = stype->spaceid;
+
+ BLI_addhead(&area->spacedata, saction);
+ area->regionbase = saction->regionbase;
+ BLI_listbase_clear(&saction->regionbase);
+
+ /* Different defaults for timeline */
+ region_channels = BKE_area_find_region_type(area, RGN_TYPE_CHANNELS);
+ region_channels->flag |= RGN_FLAG_HIDDEN;
+
+ saction->mode = SACTCONT_TIMELINE;
+ saction->ads.flag |= ADS_FLAG_SUMMARY_COLLAPSED;
+ saction->ads.filterflag |= ADS_FILTER_SUMMARY;
+}
+
+/**
+ * \brief After lib-link versioning for new workspace design.
+ *
+ * - Adds a workspace for (almost) each screen of the old file
+ * and adds the needed workspace-layout to wrap the screen.
+ * - Active screen isn't stored directly in window anymore, but in the active
workspace.
+ * - Active scene isn't stored in screen anymore, but in window.
+ * - Create workspace instance hook for each window.
+ *
+ * \note Some of the created workspaces might be deleted again in case of
reading the default startup.blend.
+ */
+static void do_version_workspaces_after_lib_link(Main *bmain)
+{
+ BLI_assert(BLI_listbase_is_empty(&bmain->workspaces));
+
+ do_version_workspaces_create_from_screens(bmain);
+
+ for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) {
+ for (wmWindow *win = wm->windows.first; win; win = win->next) {
+ bScreen *screen_parent =
screen_parent_find(win->screen);
+ bScreen *screen = screen_parent ? screen_parent :
win->screen;
+
+ if (screen->temp) {
+ /* We do not generate a new workspace for those
screens... still need to set some data in win. */
+ win->workspace_hook =
BKE_workspace_instance_hook_create(bmain);
+ win->scene = screen->scene;
+ /* Deprecated from now on! */
+ win->screen = NULL;
+ continue;
+ }
+
+ WorkSpace *workspace =
BLI_findstring(&bmain->workspaces, screen->id.name + 2, offsetof(ID, name) + 2);
+ BLI_assert(workspace != NULL);
+ ListBase *layouts =
BKE_workspace_layouts_get(workspace);
+
+ win->workspace_hook =
BKE_workspace_instance_hook_create(bmain);
+
+ BKE_workspace_active_set(win->workspace_hook,
workspace);
+ BKE_workspace_active_layout_set(win->workspace_hook,
layouts->first);
+
+ /* Move scene and view layer to window. */
+ Scene *scene = screen->scene;
+ ViewLayer *layer = BLI_findlink(&scene->view_layers,
scene->r.actlay);
+ if (!layer) {
+ layer = BKE_view_layer_default_view(scene);
+ }
+
+ win->scene = scene;
+ STRNCPY(win->view_layer_name, layer->name);
+
+ /* Deprecated from now on! */
+ win->screen = NULL;
+ }
+ }
+
+ for (bScreen *screen = bmain->screen.first; screen; screen =
screen->id.next) {
+ /* Deprecated from now on! */
+ BLI_freelistN(&screen->scene->transform_spaces);
+ screen->scene = NULL;
+ }
+}
+
+#ifdef USE_COLLECTION_COMPAT_28
+enum {
+ COLLECTION_DEPRECATED_VISIBLE = (1 << 0),
+ COLLECTION_DEPRECATED_VIEWPORT = (1 << 0),
+ COLLECTION_DEPRECATED_SELECTABLE = (1 << 1),
+ COLLECTION_DEPRECATED_DISABLED = (1 << 2),
+ COLLECTION_DEPRECATED_RENDER = (1 << 3),
+};
+
+static void do_version_view_layer_visibility(ViewLayer *view_layer)
+{
+ /* Convert from deprecated VISIBLE flag to DISABLED */
+ LayerCollection *lc;
+ for (lc = view_layer->layer_collections.first;
+ lc;
+ lc = lc->next)
+ {
+ if (lc->flag & COLLECTION_DEPRECATED_DISABLED) {
+ lc->flag &= ~COLLECTION_DEPRECATED_DISABLED;
+ }
+
+ if ((lc->flag & COLLECTION_DEPRECATED_VISIBLE) == 0) {
+ lc->flag |= COLLECTION_DEPRECATED_DISABLED;
+ }
+
+ lc->flag |= COLLECTION_DEPRECATED_VIEWPORT |
COLLECTION_DEPRECATED_RENDER;
+ }
+}
+
+static void do_version_layer_collection_pre(
+ ViewLayer *view_layer,
+ ListBase *lb,
+ GSet *enabled_set,
+ GSet *selectable_set)
+{
+ /* Convert from deprecated DISABLED to new layer collection and
collection flags */
+ for (LayerCollection *lc = lb->first; lc; lc = lc->next) {
+ if (lc->scene_collection) {
+ if (!(lc->flag & COLLECTION_DEPRECATED_DISABLED)) {
+ BLI_gset_insert(enabled_set,
lc->scene_collection);
+ }
+ if (lc->flag & COLLECTION_DEPRECATED_SELECTABLE) {
+ BLI_gset_insert(selectable_set,
lc->scene_collection);
+ }
+ }
+
+ do_version_layer_collection_pre(
@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs