No experimental feature (but debug ones) to work for blender beta/release
Final releases (including beta) should strictly show features that are finalized to prevent loss of data, old API clanging around, and the overall quality of the product (Blender) presented. Note that rendering should never be affected by user preferences, so this is only changing things in the UI level. Development note: This is reset experimental UI on file load. Also note: to hide RNA (needed for hair and particles) will be done as a separate patch. Differential Revision: https://developer.blender.org/D8606
This commit is contained in:
parent
aba46371a1
commit
20a8edaa72
Notes:
blender-bot
2023-02-14 08:29:54 +01:00
Referenced by commit97dc370c50
, Fix compiler error in MSVSC Referenced by commitb3b67a61b7
, Fix compiler error in MSVSC Referenced by issue #79026, Remove experimental features for 2.90 release
|
@ -2118,6 +2118,10 @@ class ExperimentalPanel:
|
|||
|
||||
url_prefix = "https://developer.blender.org/"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return bpy.app.version_cycle == 'alpha'
|
||||
|
||||
def _draw_items(self, context, items):
|
||||
prefs = context.preferences
|
||||
experimental = prefs.experimental
|
||||
|
@ -2178,6 +2182,12 @@ class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel):
|
|||
class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel):
|
||||
bl_label = "Debugging"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
# Unlike the other experimental panels, the debugging one is always visible
|
||||
# even in beta or release.
|
||||
return True
|
||||
|
||||
def draw(self, context):
|
||||
self._draw_items(
|
||||
context, (
|
||||
|
|
|
@ -50,6 +50,9 @@ extern "C" {
|
|||
/** User readable version string. */
|
||||
const char *BKE_blender_version_string(void);
|
||||
|
||||
/* Returns true when version cycle is alpha, otherwise (beta, rc) returns false. */
|
||||
bool BKE_blender_version_is_alpha(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -135,6 +135,12 @@ const char *BKE_blender_version_string(void)
|
|||
return blender_version_string;
|
||||
}
|
||||
|
||||
bool BKE_blender_version_is_alpha(void)
|
||||
{
|
||||
static bool is_alpha = STREQ(STRINGIFY(BLENDER_VERSION_CYCLE), "alpha");
|
||||
return is_alpha;
|
||||
}
|
||||
|
||||
void BKE_blender_globals_init(void)
|
||||
{
|
||||
blender_version_init();
|
||||
|
|
|
@ -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) */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLO_readfile.h"
|
||||
|
||||
#include "BKE_animsys.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_idprop.h"
|
||||
|
@ -6818,6 +6820,8 @@ void UI_init_userdef(Main *bmain)
|
|||
/* fix saved themes */
|
||||
init_userdef_do_versions(bmain);
|
||||
uiStyleInit();
|
||||
|
||||
BLO_sanitize_experimental_features_userpref_blend(&U);
|
||||
}
|
||||
|
||||
void UI_reinit_font(void)
|
||||
|
|
Loading…
Reference in New Issue