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:
authorCampbell Barton <ideasman42@gmail.com>2011-06-07 14:54:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-06-07 14:54:57 +0400
commit9c8cc9fe60e783f698e291ed5ef338a477214f22 (patch)
tree863dd56a0ae42db495801ab436022d92df3d543b /source/blender/makesrna
parent3cd3cc892faa864cde4171b1752679bfb062066b (diff)
rna option not to save certain properties for redoing later, currently only used by operator presets.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_rna.c12
2 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 090b87e9e39..ec213d6a496 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -159,6 +159,8 @@ typedef enum PropertyFlag {
/* hidden in the user interface */
PROP_HIDDEN = 1<<19,
+ /* do not write in presets */
+ PROP_SKIP_SAVE = 1<<28,
/* function paramater flags */
PROP_REQUIRED = 1<<2,
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 84bb624b546..b4da3a02442 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -493,6 +493,13 @@ static int rna_Property_is_hidden_get(PointerRNA *ptr)
return prop->flag & PROP_HIDDEN ? 1:0;
}
+static int rna_Property_is_skip_save_get(PointerRNA *ptr)
+{
+ PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ return prop->flag & PROP_SKIP_SAVE ? 1:0;
+}
+
+
static int rna_Property_is_enum_flag_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
@@ -1037,6 +1044,11 @@ static void rna_def_property(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, "rna_Property_is_hidden_get", NULL);
RNA_def_property_ui_text(prop, "Hidden", "True when the property is hidden");
+ prop= RNA_def_property(srna, "is_skip_save", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_boolean_funcs(prop, "rna_Property_is_skip_save_get", NULL);
+ RNA_def_property_ui_text(prop, "Skip Save", "True when the property is not saved in presets");
+
prop= RNA_def_property(srna, "is_output", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_use_output_get", NULL);