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>2010-09-02 18:43:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-02 18:43:22 +0400
commit0d12c77097b19bfa688c99480f755184ad46342b (patch)
treea37bd154a82915c9b616fcbd855c6e4aeff16939 /source/blender/makesrna/intern/rna_rna.c
parent4e9162cd63badf4bf5fb312e108ffbbc58ebd342 (diff)
bugfix [#23635] property limits don't work when added via scripting\
also fix for bug where soft limits could be greater then hard limits with bpy.props.* functions.
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r--source/blender/makesrna/intern/rna_rna.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 4bfd0e4fd41..81b0df1d840 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_registered_optional_get(PointerRNA *ptr)
return prop->flag & PROP_REGISTER_OPTIONAL;
}
+static int rna_Property_runtime_get(PointerRNA *ptr)
+{
+ PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ return prop->flag & PROP_RUNTIME;
+}
+
+
static int rna_BoolProperty_default_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
@@ -1018,6 +1025,11 @@ static void rna_def_property(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_registered_optional_get", NULL);
RNA_def_property_ui_text(prop, "Registered Optionally", "Property is optionally registered as part of type registration");
+
+ 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");
}
static void rna_def_function(BlenderRNA *brna)