diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-24 10:30:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-24 10:30:15 +0300 |
commit | c0339029c76b53461edad9ab2ebdae4bce61dfee (patch) | |
tree | c11c20d7e0de7e78318b1537f23d8d59757dd729 | |
parent | 80e85c10be4165181e658f06956e9138d3f5c6a1 (diff) |
is_hidden property for rna introspection
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 3152fc04b0d..9e04132eaba 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -474,6 +474,12 @@ static int rna_Property_is_never_none_get(PointerRNA *ptr) return prop->flag & PROP_NEVER_NULL ? 1:0; } +static int rna_Property_is_hidden_get(PointerRNA *ptr) +{ + PropertyRNA *prop= (PropertyRNA*)ptr->data; + return prop->flag & PROP_HIDDEN ? 1:0; +} + static int rna_Property_array_length_get(PointerRNA *ptr) { PropertyRNA *prop= (PropertyRNA*)ptr->data; @@ -1011,6 +1017,11 @@ static void rna_def_property(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_Property_is_never_none_get", NULL); RNA_def_property_ui_text(prop, "Never None", "True when this value can't be set to None"); + prop= RNA_def_property(srna, "is_hidden", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + 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_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); |