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:
authorBastien Montagne <b.mont29@gmail.com>2020-03-17 14:29:36 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-03-17 17:02:05 +0300
commitb852db57ba24adfcfaa0ada7e9ff513a79a399a2 (patch)
tree19d2a41451ecf6a3d07a53c98bb0cd4ad76c77e6 /source/blender/makesrna/intern/rna_userdef.c
parent9ce38909500a47beff87081147178d7a52449df7 (diff)
Add experimental global undo speedup.
The feature is hidden behind an experimental option, you'll have to enable it in the preferences to try it. This feature is not yet considered fully stable, crashes may happen, as well as .blend file corruptions (very unlikely, but still possible). In a nutshell, the ideas behind this code are to: * Detect unchanged IDs across an undo step. * Reuse as much as possible existing IDs memory, even when its content did change. * Re-use existing depsgraphs instead of building new ones from scratch. * Store accumulated recalc flags, to avoid needless re-compute of things that did not change, when the ID itself is detected as modified. See T60695 and D6580 for more technical details.
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index a153c1dda1e..195a80a1101 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -5918,12 +5918,20 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
static void rna_def_userdef_experimental(BlenderRNA *brna)
{
StructRNA *srna;
+ PropertyRNA *prop;
srna = RNA_def_struct(brna, "PreferencesExperimental", NULL);
RNA_def_struct_sdna(srna, "UserDef_Experimental");
RNA_def_struct_nested(brna, srna, "Preferences");
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);
+ RNA_def_property_ui_text(
+ prop,
+ "Undo Speedup",
+ "Use new undo speedup (WARNING: can lead to crashes and serious .blend file corruption)");
}
static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)