Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-08-19 20:53:23 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-08-19 20:53:23 +0300
commit585089cdb6521915d760c59572eeadbf59b0d833 (patch)
tree39bf51a0816655e75ddd1ae8d192abdf3f4ad947 /source/blender/blenloader
parente3079476f7a70b6e54a9741aea4b2644d17ab866 (diff)
parent4f6051e8c4664a3e0efdc14de26f4e9e0ff873fd (diff)
Merge branch 'master' into greasepencil-edit-curve
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c71
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c10
2 files changed, 58 insertions, 23 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 1b7dc0c66aa..dbec46cfbfd 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -208,6 +208,17 @@ void do_versions_after_linking_290(Main *bmain, ReportList *UNUSED(reports))
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 291, 1)) {
+ LISTBASE_FOREACH (Collection *, collection, &bmain->collections) {
+ if (BKE_collection_cycles_fix(bmain, collection)) {
+ printf(
+ "WARNING: Cycle detected in collection '%s', fixed as best as possible.\n"
+ "You may have to reconstruct your View Layers...\n",
+ collection->id.name);
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
@@ -219,18 +230,26 @@ void do_versions_after_linking_290(Main *bmain, ReportList *UNUSED(reports))
* \note Keep this message at the bottom of the function.
*/
{
- LISTBASE_FOREACH (Collection *, collection, &bmain->collections) {
- if (BKE_collection_cycles_fix(bmain, collection)) {
- printf(
- "WARNING: Cycle detected in collection '%s', fixed as best as possible.\n"
- "You may have to reconstruct your View Layers...\n",
- collection->id.name);
- }
- }
+
/* Keep this block, even when empty. */
}
}
+static void panels_remove_x_closed_flag_recursive(Panel *panel)
+{
+ const bool was_closed_x = panel->flag & PNL_UNUSED_1;
+ const bool was_closed_y = panel->flag & PNL_CLOSED; /* That value was the Y closed flag. */
+
+ SET_FLAG_FROM_TEST(panel->flag, was_closed_x || was_closed_y, PNL_CLOSED);
+
+ /* Clear the old PNL_CLOSEDX flag. */
+ panel->flag &= ~PNL_UNUSED_1;
+
+ LISTBASE_FOREACH (Panel *, child_panel, &panel->children) {
+ panels_remove_x_closed_flag_recursive(child_panel);
+ }
+}
+
void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
{
UNUSED_VARS(fd);
@@ -423,17 +442,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- /**
- * 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. */
+ if (!MAIN_VERSION_ATLEAST(bmain, 291, 1)) {
/* Initialize additional parameter of the Nishita sky model and change altitude unit. */
if (!DNA_struct_elem_find(fd->filesdna, "NodeTexSky", "float", "sun_intensity")) {
@@ -498,5 +507,29 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ /* Remove panel X axis collapsing, a remnant of horizontal panel alignment. */
+ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
+ LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+ LISTBASE_FOREACH (ARegion *, region, &area->regionbase) {
+ LISTBASE_FOREACH (Panel *, panel, &region->panels) {
+ panels_remove_x_closed_flag_recursive(panel);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * 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. */
}
}
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index 0b116804481..1437d46bd8d 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -758,6 +758,12 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
userdef->statusbar_flag = STATUSBAR_SHOW_VERSION;
}
+ if (!USER_VERSION_ATLEAST(291, 1)) {
+ if (userdef->collection_instance_empty_size == 0) {
+ userdef->collection_instance_empty_size = 1.0f;
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
@@ -769,10 +775,6 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
*/
{
/* Keep this block, even when empty. */
-
- if (userdef->collection_instance_empty_size == 0) {
- userdef->collection_instance_empty_size = 1.0f;
- }
}
if (userdef->pixelsize == 0.0f) {