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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r--source/blender/makesrna/intern/rna_rna.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index de2b551909c..e063f8ec85a 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -341,7 +341,7 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point
/* this was used pre 2.5beta0, now ID property access uses python's
* getitem style access
- * - ob["foo"] rather then ob.foo */
+ * - ob["foo"] rather than ob.foo */
#if 0
if(ptr->data) {
IDProperty *group, *idp;
@@ -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;
@@ -697,7 +704,7 @@ static int rna_StringProperty_max_length_get(PointerRNA *ptr)
return ((StringPropertyRNA*)prop)->maxlength;
}
-static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA *ptr, int *free)
+static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
EnumPropertyRNA *eprop;
@@ -713,7 +720,7 @@ static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA
return eprop->item;
}
- return eprop->itemf(C, ptr, free);
+ return eprop->itemf(C, ptr, prop, free);
}
/* XXX - not sure this is needed? */
@@ -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);
@@ -1055,7 +1067,7 @@ static void rna_def_property(BlenderRNA *brna)
prop= RNA_def_property(srna, "is_runtime", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_runtime_get", NULL);
- RNA_def_property_ui_text(prop, "Read Only", "Property is editable through RNA");
+ RNA_def_property_ui_text(prop, "Runtime", "Property has been dynamically created at runtime");
prop= RNA_def_property(srna, "is_enum_flag", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);