From f682de6fd2b4b64bc405f36f68c4024797b84492 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 21 Jul 2009 01:14:55 +0000 Subject: RNA * Added suppport for generating code without verifying with DNA, this doesn't give good errors and is more error prone, but makes it easier to wrap things like EditBone which are not in DNA. * RNA_define_verify_sdna(0), and set to 1 again afterwards. --- source/blender/makesrna/intern/rna_ui.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/makesrna/intern/rna_ui.c') diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 217f1ea00a8..e83557957f6 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -633,7 +633,10 @@ static void rna_def_header(BlenderRNA *brna) RNA_def_function_flag(func, FUNC_REGISTER); RNA_def_pointer(func, "context", "Context", "", ""); + RNA_define_verify_sdna(0); // not in sdna + prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "layout"); RNA_def_property_struct_type(prop, "UILayout"); /* registration */ @@ -645,6 +648,8 @@ static void rna_def_header(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); RNA_def_property_enum_items(prop, space_type_items); RNA_def_property_flag(prop, PROP_REGISTER); + + RNA_define_verify_sdna(1); } static void rna_def_menu(BlenderRNA *brna) @@ -672,7 +677,10 @@ static void rna_def_menu(BlenderRNA *brna) RNA_def_function_flag(func, FUNC_REGISTER); RNA_def_pointer(func, "context", "Context", "", ""); + RNA_define_verify_sdna(0); // not in sdna + prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "layout"); RNA_def_property_struct_type(prop, "UILayout"); /* registration */ @@ -688,6 +696,8 @@ static void rna_def_menu(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); RNA_def_property_enum_items(prop, space_type_items); RNA_def_property_flag(prop, PROP_REGISTER); + + RNA_define_verify_sdna(1); } void RNA_def_ui(BlenderRNA *brna) -- cgit v1.2.3