diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ad982ae3d2..ab7f932a128 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -781,8 +781,10 @@ if(WIN32) option(WITH_TBB_MALLOC_PROXY "Enable the TBB malloc replacement" ON) endif() +option(WITH_EXPERIMENTAL_FEATURES "Enable experimental features" ON) + # This should be turned off when Blender enter beta/rc/release -if("${BLENDER_VERSION_CYCLE}" STREQUAL "alpha") +if("${BLENDER_VERSION_CYCLE}" STREQUAL "alpha" AND WITH_EXPERIMENTAL_FEATURES) set(WITH_EXPERIMENTAL_FEATURES ON) else() set(WITH_EXPERIMENTAL_FEATURES OFF) diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index 634fba706a8..1a0f23a0cf0 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -133,3 +133,7 @@ if(WITH_GTESTS) ) blender_add_test_suite_lib(blenloader "${TEST_SRC}" "${INC}" "${INC_SYS}" "${TEST_LIB}") endif() + +if(WITH_EXPERIMENTAL_FEATURES) + add_definitions(-DWITH_EXPERIMENTAL_FEATURES) +endif() \ No newline at end of file diff --git a/source/blender/blenloader/intern/versioning_userdef.cc b/source/blender/blenloader/intern/versioning_userdef.cc index 4efe9388617..b71f70e1c4f 100644 --- a/source/blender/blenloader/intern/versioning_userdef.cc +++ b/source/blender/blenloader/intern/versioning_userdef.cc @@ -953,10 +953,11 @@ void BLO_sanitize_experimental_features_userpref_blend(UserDef *userdef) * * At that time master already has its version bumped so its user preferences * are not touched by these settings. */ - +#ifdef WITH_EXPERIMENTAL_FEATURES if (BKE_blender_version_is_alpha()) { return; } +#endif MEMSET_STRUCT_AFTER(&userdef->experimental, 0, SANITIZE_AFTER_HERE); }