[Bf-blender-cvs] [d2efdaa26ca] master: Python API: expose preferences.is_dirty

Brecht Van Lommel noreply at git.blender.org
Mon May 13 10:58:07 CEST 2019


Commit: d2efdaa26cad2e493c44b7e9305db145863b4fae
Author: Brecht Van Lommel
Date:   Mon May 13 10:51:50 2019 +0200
Branches: master
https://developer.blender.org/rBd2efdaa26cad2e493c44b7e9305db145863b4fae

Python API: expose preferences.is_dirty

===================================================================

M	source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 3cfb1bbc2c7..5198d89bda8 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -5692,6 +5692,11 @@ void RNA_def_userdef(BlenderRNA *brna)
   RNA_def_property_boolean_sdna(prop, NULL, "pref_flag", USER_PREF_FLAG_SAVE);
   RNA_def_property_ui_text(prop, "Save on Exit", "Save modified preferences on exit");
 
+  prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
+  RNA_def_property_boolean_sdna(prop, NULL, "runtime.is_dirty", 0);
+  RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+  RNA_def_property_ui_text(prop, "Dirty", "Preferences have changed");
+
   rna_def_userdef_view(brna);
   rna_def_userdef_edit(brna);
   rna_def_userdef_input(brna);



More information about the Bf-blender-cvs mailing list