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-18 17:13:08 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-08-18 17:13:08 +0300
commit77efb597cee8efafd9584fcd511e6111651c6512 (patch)
tree08b3ea14968cf06c06039170bce24f44d4f63706 /source/blender/blenloader
parentde7470645a30e7bc6db67eff64d11778fb5ee3f2 (diff)
parent872efd8d73a3820680379230d83a0aadf5fc29ca (diff)
Merge branch 'master' into greasepencil-edit-curve
Conflicts: source/blender/editors/gpencil/gpencil_edit.c
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/BLO_readfile.h3
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c20
-rw-r--r--source/blender/blenloader/tests/blendfile_loading_base_test.cc2
3 files changed, 24 insertions, 1 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 97c77ed2e19..580c833d8dc 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -186,6 +186,9 @@ void BLO_update_defaults_workspace(struct WorkSpace *workspace, const char *app_
/* Version patch user preferences. */
void BLO_version_defaults_userpref_blend(struct Main *mainvar, struct UserDef *userdef);
+/* Disable unwanted experimental feature settings on startup. */
+void BLO_sanitize_experimental_features_userpref_blend(struct UserDef *userdef);
+
struct BlendThumbnail *BLO_thumbnail_from_file(const char *filepath);
/* datafiles (generated theme) */
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index e2dc27d7e88..0b116804481 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -38,6 +38,7 @@
#include "DNA_windowmanager_types.h"
#include "BKE_addon.h"
+#include "BKE_blender_version.h"
#include "BKE_colorband.h"
#include "BKE_idprop.h"
#include "BKE_keyconfig.h"
@@ -784,4 +785,23 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
#undef USER_VERSION_ATLEAST
}
+void BLO_sanitize_experimental_features_userpref_blend(UserDef *userdef)
+{
+ /* User preference experimental settings are only supported in alpha builds.
+ * This prevents users corrupting data and relying on API that may change.
+ *
+ * If user preferences are saved this will be stored in disk as expected.
+ * This only starts to take effect when there is a release branch (on beta).
+ *
+ * At that time master already has its version bumped so its user preferences
+ * are not touched by these settings. */
+
+ if (BKE_blender_version_is_alpha()) {
+ return;
+ }
+ userdef->experimental.use_new_particle_system = false;
+ userdef->experimental.use_new_hair_type = false;
+ userdef->experimental.use_sculpt_vertex_colors = false;
+}
+
#undef USER_LMOUSESELECT
diff --git a/source/blender/blenloader/tests/blendfile_loading_base_test.cc b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
index d74bab4b31c..c743e6bcd3f 100644
--- a/source/blender/blenloader/tests/blendfile_loading_base_test.cc
+++ b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
@@ -148,7 +148,7 @@ void BlendfileLoadingBaseTest::depsgraph_create(eEvaluationMode depsgraph_evalua
{
depsgraph = DEG_graph_new(
bfile->main, bfile->curscene, bfile->cur_view_layer, depsgraph_evaluation_mode);
- DEG_graph_build_from_view_layer(depsgraph, bfile->main, bfile->curscene, bfile->cur_view_layer);
+ DEG_graph_build_from_view_layer(depsgraph);
BKE_scene_graph_update_tagged(depsgraph, bfile->main);
}