[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33882] trunk/blender/source/blender/ makesrna/intern/rna_rna.c: is_hidden property for rna introspection

Campbell Barton ideasman42 at gmail.com
Fri Dec 24 08:30:16 CET 2010


Revision: 33882
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33882
Author:   campbellbarton
Date:     2010-12-24 08:30:15 +0100 (Fri, 24 Dec 2010)

Log Message:
-----------
is_hidden property for rna introspection

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_rna.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_rna.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_rna.c	2010-12-24 04:27:21 UTC (rev 33881)
+++ trunk/blender/source/blender/makesrna/intern/rna_rna.c	2010-12-24 07:30:15 UTC (rev 33882)
@@ -474,6 +474,12 @@
 	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 @@
 	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);





More information about the Bf-blender-cvs mailing list