Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_ui_api.c
| Show First 20 Lines • Show All 448 Lines • ▼ Show 20 Lines | void RNA_api_ui_layout(StructRNA *srna) | ||||
| static const EnumPropertyItem curve_type_items[] = { | static const EnumPropertyItem curve_type_items[] = { | ||||
| {0, "NONE", 0, "None", ""}, | {0, "NONE", 0, "None", ""}, | ||||
| {'v', "VECTOR", 0, "Vector", ""}, | {'v', "VECTOR", 0, "Vector", ""}, | ||||
| {'c', "COLOR", 0, "Color", ""}, | {'c', "COLOR", 0, "Color", ""}, | ||||
| {'h', "HUE", 0, "Hue", ""}, | {'h', "HUE", 0, "Hue", ""}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static const EnumPropertyItem id_template_filter_items[] = { | |||||
| {UI_TEMPLATE_ID_FILTER_NONE, "NONE", 0, "None", ""}, | |||||
| {UI_TEMPLATE_ID_FILTER_AVAILABLE, "AVAILABLE", 0, "Available", ""}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| static float node_socket_color_default[] = { 0.0f, 0.0f, 0.0f, 1.0f }; | static float node_socket_color_default[] = { 0.0f, 0.0f, 0.0f, 1.0f }; | ||||
| /* simple layout specifiers */ | /* simple layout specifiers */ | ||||
| func = RNA_def_function(srna, "row", "uiLayoutRow"); | func = RNA_def_function(srna, "row", "uiLayoutRow"); | ||||
| parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); | parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| RNA_def_function_ui_description(func, | RNA_def_function_ui_description(func, | ||||
| "Sub-layout. Items placed in this sublayout are placed next to each other " | "Sub-layout. Items placed in this sublayout are placed next to each other " | ||||
| ▲ Show 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | #endif | ||||
| RNA_def_function_ui_description(func, "Inserts common Space header UI (editor type selector)"); | RNA_def_function_ui_description(func, "Inserts common Space header UI (editor type selector)"); | ||||
| func = RNA_def_function(srna, "template_ID", "uiTemplateID"); | func = RNA_def_function(srna, "template_ID", "uiTemplateID"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); | RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); | ||||
| RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); | RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); | ||||
| RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); | RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); | ||||
| RNA_def_enum(func, "filter", id_template_filter_items, 0, "", "Optionally limit the items which can be selected"); | |||||
| func = RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview"); | func = RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); | RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); | ||||
| RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); | RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); | ||||
| RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); | RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); | ||||
| RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX); | RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX); | ||||
| RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX); | RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX); | ||||
| RNA_def_enum(func, "filter", id_template_filter_items, 0, "", "Optionally limit the items which can be selected"); | |||||
| func = RNA_def_function(srna, "template_any_ID", "rna_uiTemplateAnyID"); | func = RNA_def_function(srna, "template_any_ID", "rna_uiTemplateAnyID"); | ||||
| parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | ||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_string(func, "type_property", NULL, 0, "", | parm = RNA_def_string(func, "type_property", NULL, 0, "", | ||||
| "Identifier of property in data giving the type of the ID-blocks to use"); | "Identifier of property in data giving the type of the ID-blocks to use"); | ||||
| ▲ Show 20 Lines • Show All 255 Lines • Show Last 20 Lines | |||||