[Bf-blender-cvs] [c565d0764f7] blender-v2.83-release: Enable new undo code by default.
Bastien Montagne
noreply at git.blender.org
Fri Apr 17 15:13:34 CEST 2020
Commit: c565d0764f75ba5a5bb51d5daa9152897db59eb8
Author: Bastien Montagne
Date: Fri Apr 17 15:11:16 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBc565d0764f75ba5a5bb51d5daa9152897db59eb8
Enable new undo code by default.
Note that given how experimental is working currently, I had to rename
and inverse the effect of the experimental undo flag, which will now
instead activate legacy code when set.
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
M source/blender/editors/undo/memfile_undo.c
M source/blender/makesdna/DNA_userdef_types.h
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 414444a6ee5..179b3612a62 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2167,7 +2167,7 @@ class USERPREF_PT_experimental_system(ExperimentalPanel, Panel):
def draw(self, context):
self._draw_items(
context, (
- ({"property": "use_undo_speedup"}, "T60695"),
+ ({"property": "use_undo_legacy"}, "T60695"),
),
)
diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c
index 9954cf85157..f22e18de7a1 100644
--- a/source/blender/editors/undo/memfile_undo.c
+++ b/source/blender/editors/undo/memfile_undo.c
@@ -147,7 +147,7 @@ static void memfile_undosys_step_decode(struct bContext *C,
bool use_old_bmain_data = true;
- if (!U.experimental.use_undo_speedup) {
+ if (USER_EXPERIMENTAL_TEST(&U, use_undo_legacy)) {
use_old_bmain_data = false;
}
else if (undo_direction > 0) {
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index e8f4cae573a..7a09059e344 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -618,7 +618,7 @@ typedef struct UserDef_FileSpaceData {
} UserDef_FileSpaceData;
typedef struct UserDef_Experimental {
- char use_undo_speedup;
+ char use_undo_legacy;
char use_menu_search;
/** `makesdna` does not allow empty structs. */
char _pad0[6];
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 514d7428ff8..c08a95d7e16 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -6057,12 +6057,12 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Experimental", "Experimental features");
- prop = RNA_def_property(srna, "use_undo_speedup", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "use_undo_speedup", 1);
+ prop = RNA_def_property(srna, "use_undo_legacy", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "use_undo_legacy", 1);
RNA_def_property_ui_text(
prop,
- "Undo Speedup",
- "Use new undo speedup (WARNING: can lead to crashes and serious .blend file corruption)");
+ "Undo Legacy",
+ "Use legacy undo (slower than the new default one, but may be more stable in some cases)");
prop = RNA_def_property(srna, "use_menu_search", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_menu_search", 1);
More information about the Bf-blender-cvs
mailing list