diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-05-13 12:36:39 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-05-13 12:36:54 +0300 |
commit | 9361fea99f18b5533011b5a12abfe862ba91b3e7 (patch) | |
tree | de08889c4058ba4a2c474ecbf0ec3df5b386e1e8 /source/blender/makesrna | |
parent | 8cdf76fad970cf154e029a71de7ab2dff8a68f49 (diff) |
RNA: disable undo on OperatorProperties and its subclasses.
Since these are temporary properties, changing them shouldn't cause
undo pushes. There already is a flag to disable that, but since each
operator inherits its own properties from the base, RNA define code
also had to be changed to allow inheriting the flag.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 20fbbed572c..8e24e9a8364 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -890,9 +890,9 @@ StructRNA *RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRN srna->description = ""; /* may be overwritten later RNA_def_struct_translation_context */ srna->translation_context = BLT_I18NCONTEXT_DEFAULT_BPYRNA; - srna->flag |= STRUCT_UNDO; if (!srnafrom) { srna->icon = ICON_DOT; + srna->flag |= STRUCT_UNDO; } if (DefRNA.preprocess) { diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 3f904df6e00..66904cae82c 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1868,6 +1868,7 @@ static void rna_def_operator(BlenderRNA *brna) RNA_def_struct_idprops_func(srna, "rna_OperatorProperties_idprops"); RNA_def_struct_property_tags(srna, rna_enum_operator_property_tags); RNA_def_struct_flag(srna, STRUCT_NO_DATABLOCK_IDPROPERTIES); + RNA_def_struct_clear_flag(srna, STRUCT_UNDO); } static void rna_def_macro_operator(BlenderRNA *brna) |