Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_ui.c
| Show First 20 Lines • Show All 1,017 Lines • ▼ Show 20 Lines | static void rna_def_panel(BlenderRNA *brna) | ||||
| RNA_def_property_string_default(prop, BLT_I18NCONTEXT_DEFAULT_BPYRNA); | RNA_def_property_string_default(prop, BLT_I18NCONTEXT_DEFAULT_BPYRNA); | ||||
| RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); | RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); | ||||
| RNA_define_verify_sdna(true); | RNA_define_verify_sdna(true); | ||||
| prop = RNA_def_property(srna, "bl_category", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "bl_category", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_sdna(prop, NULL, "type->category"); | RNA_def_property_string_sdna(prop, NULL, "type->category"); | ||||
| RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); | RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); | ||||
| prop = RNA_def_property(srna, "bl_origin", PROP_STRING, PROP_NONE); | |||||
| RNA_def_property_string_sdna(prop, NULL, "type->bl_origin"); | |||||
| RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); | |||||
| prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); | RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_space_type_items); | RNA_def_property_enum_items(prop, rna_enum_space_type_items); | ||||
| RNA_def_property_flag(prop, PROP_REGISTER); | RNA_def_property_flag(prop, PROP_REGISTER); | ||||
| RNA_def_property_ui_text(prop, "Space type", "The space where the panel is going to be used in"); | RNA_def_property_ui_text(prop, "Space type", "The space where the panel is going to be used in"); | ||||
| prop = RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "type->region_type"); | RNA_def_property_enum_sdna(prop, NULL, "type->region_type"); | ||||
| ▲ Show 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | static void rna_def_menu(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_sdna(prop, NULL, "type->description"); | RNA_def_property_string_sdna(prop, NULL, "type->description"); | ||||
| RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */ | RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */ | ||||
| RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Menu_bl_description_set"); | RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Menu_bl_description_set"); | ||||
| /* RNA_def_property_clear_flag(prop, PROP_EDITABLE); */ | /* RNA_def_property_clear_flag(prop, PROP_EDITABLE); */ | ||||
| RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); | RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); | ||||
| RNA_def_property_clear_flag(prop, PROP_NEVER_NULL); /* check for NULL */ | RNA_def_property_clear_flag(prop, PROP_NEVER_NULL); /* check for NULL */ | ||||
| prop = RNA_def_property(srna, "bl_origin", PROP_STRING, PROP_NONE); | |||||
| RNA_def_property_string_sdna(prop, NULL, "type->bl_origin"); | |||||
| RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); | |||||
| RNA_define_verify_sdna(1); | RNA_define_verify_sdna(1); | ||||
| } | } | ||||
| void RNA_def_ui(BlenderRNA *brna) | void RNA_def_ui(BlenderRNA *brna) | ||||
| { | { | ||||
| rna_def_ui_layout(brna); | rna_def_ui_layout(brna); | ||||
| rna_def_panel(brna); | rna_def_panel(brna); | ||||
| rna_def_uilist(brna); | rna_def_uilist(brna); | ||||
| rna_def_header(brna); | rna_def_header(brna); | ||||
| rna_def_menu(brna); | rna_def_menu(brna); | ||||
| } | } | ||||
| #endif /* RNA_RUNTIME */ | #endif /* RNA_RUNTIME */ | ||||