diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_main.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 7a680e00c8b..7688d92f2e1 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -50,6 +50,10 @@ static void rna_Main_debug_set(PointerRNA *ptr, const int value) G.f &= ~G_DEBUG; } +static int rna_Main_fileissaved_get(PointerRNA *ptr) +{ + return G.relbase_valid; +} static void rna_Main_filename_get(PointerRNA *ptr, char *value) { @@ -308,6 +312,11 @@ void RNA_def_main(BlenderRNA *brna) RNA_def_property_string_funcs(prop, "rna_Main_filename_get", "rna_Main_filename_length", "rna_Main_filename_set"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file"); + + prop= RNA_def_property(srna, "file_is_saved", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_boolean_funcs(prop, "rna_Main_fileissaved_get", NULL); + RNA_def_property_ui_text(prop, "File is Saved", "Has the current session been saved to disk as a .blend file"); prop= RNA_def_property(srna, "debug", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_Main_debug_get", "rna_Main_debug_set"); |