23#define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""},
24#define DEF_ICON_VECTOR(name) {ICON_##name, (#name), 0, (#name), ""},
25#define DEF_ICON_COLOR(name) {ICON_##name, (#name), 0, (#name), ""},
26#define DEF_ICON_BLANK(name)
33 {0,
nullptr, 0,
nullptr,
nullptr},
41 "Draw popup panel above or below the button"},
46 "Draw popup panel to the side of the button"},
47 {0,
nullptr, 0,
nullptr,
nullptr},
56 "Recent files in the active project"},
61 "Recent files not in the active project"},
62 {0,
nullptr, 0,
nullptr,
nullptr},
102 if (text_ctxt && text_ctxt[0]) {
129static void rna_uiItemTextBox(Layout *layout,
132 const char *propname,
134 const char *text_ctxt,
136 const int initial_visible_lines,
137 const char *placeholder)
149 name, text_ctxt,
nullptr, prop,
translate);
151 std::optional<StringRefNull> placeholder_opt = std::nullopt;
155 layout->textbox(
C, ptr, propname, text, placeholder_opt, initial_visible_lines);
158static void rna_uiItemTextBoxWithState(Layout *layout,
160 const char *propname,
162 const char *text_ctxt,
165 const char *placeholder)
170 RNA_warning_bare(
"UILayout.textbox_with_state(): property not found: %s.%s",
177 name, text_ctxt,
nullptr, prop,
translate);
179 std::optional<StringRefNull> placeholder_opt = std::nullopt;
185 layout->textbox_with_state(
186 ptr, propname, state_ptr->data_as<
TextboxState>(), text, placeholder_opt);
189static void rna_uiItemR(Layout *layout,
191 const char *propname,
193 const char *text_ctxt,
196 const char *placeholder,
206 bool invert_checkbox,
218 if (icon_value && !icon) {
224 name, text_ctxt,
nullptr, prop,
translate);
226 placeholder, text_ctxt,
nullptr, prop,
translate);
238 else if (toggle == 0) {
251 if (emboss ==
false) {
254 if (invert_checkbox) {
261 layout->prop(ptr, prop,
index, 0, flag, text, icon, placeholder_str);
264static void rna_uiItemR_with_popover(Layout *layout,
266 const char *propname,
268 const char *text_ctxt,
272 const char *panel_type)
285 RNA_warning_bare(
"UILayout.prop_with_popover(): property is not an enum or color: %s.%s",
297 name, text_ctxt,
nullptr, prop,
translate);
298 layout->prop_with_popover(ptr, prop, -1, 0, flag, text, icon, panel_type);
301static void rna_uiItemR_with_menu(Layout *layout,
303 const char *propname,
305 const char *text_ctxt,
309 const char *menu_type)
320 RNA_warning_bare(
"UILayout.prop_with_menu(): property is not an enum: %s.%s",
332 name, text_ctxt,
nullptr, prop,
translate);
333 layout->prop_with_menu(ptr, prop, -1, 0, flag, text, icon, menu_type);
336static void rna_uiItemMenuEnumR(Layout *layout,
338 const char *propname,
340 const char *text_ctxt,
355 name, text_ctxt,
nullptr, prop,
translate);
356 layout->prop_menu_enum(ptr, prop, text, icon);
359static void rna_uiItemTabsEnumR(Layout *layout,
362 const char *propname,
364 const char *propname_highlight,
377 RNA_warning_bare(
"UILayout.prop_tabs_enum(): property is not an enum: %s.%s",
385 if (*ptr_highlight) {
387 if (!prop_highlight) {
394 RNA_warning_bare(
"UILayout.prop_tabs_enum(): property is not a boolean: %s.%s",
400 RNA_warning_bare(
"UILayout.prop_tabs_enum(): property is not an array: %s.%s",
407 layout->prop_tabs_enum(
408 C, ptr, prop, ptr_highlight, prop_highlight, icon_only,
ui::EnumTabExpand(expand_as));
411static void rna_uiItemEnumR_string(Layout *layout,
413 const char *propname,
416 const char *text_ctxt,
431 name, text_ctxt,
nullptr, prop,
translate);
433 layout->prop_enum(ptr, prop, value, text, icon);
436static void rna_uiItemsEnumR(Layout *layout,
PointerRNA *ptr,
const char *propname)
438 layout->props_enum(ptr, propname);
441static void rna_uiItemPointerR(Layout *layout,
443 const char *propname,
445 const char *searchpropname,
447 const char *text_ctxt,
450 const bool results_are_suggestions,
451 const char *item_searchpropname)
469 if (item_searchpropname && item_searchpropname[0]) {
472 if (!item_searchprop) {
473 RNA_warning_bare(
"UILayout.prop_search(): Collection items search property not found: %s.%s",
475 item_searchpropname);
481 name, text_ctxt,
nullptr, prop,
translate);
484 ptr, prop, searchptr, searchprop, item_searchprop, text, icon, results_are_suggestions);
487void rna_uiLayoutDecorator(Layout *layout,
PointerRNA *ptr,
const char *propname,
int index)
489 layout->decorator(ptr, propname,
index);
495 const char *text_ctxt,
501 const float search_weight)
506 if (!ot || !ot->srna) {
508 "UILayout.operator(): %s '%s'", ot ?
"operator missing srna" :
"unknown operator", opname);
514 name, text_ctxt, ot->srna,
nullptr,
translate);
516 if (icon_value && !icon) {
520 if (emboss ==
false) {
527 const float prev_weight = layout->search_weight();
528 layout->search_weight_set(search_weight);
530 PointerRNA opptr = layout->op(ot, text, icon, layout->operator_context(), flag);
532 layout->search_weight_set(prev_weight);
536static PointerRNA rna_uiItemOMenuHold(Layout *layout,
539 const char *text_ctxt,
548 if (!ot || !ot->srna) {
550 ot ?
"operator missing srna" :
"unknown operator",
557 name, text_ctxt, ot->srna,
nullptr,
translate);
558 if (icon_value && !icon) {
562 if (emboss ==
false) {
569 return layout->op_menu_hold(ot, text, icon, layout->operator_context(), flag, menu);
572static void rna_uiItemsEnumO(Layout *layout,
574 const char *propname,
575 const bool icon_only)
578 layout->op_enum(opname, propname,
nullptr, layout->operator_context(), flag);
581static PointerRNA rna_uiItemMenuEnumO(Layout *layout,
584 const char *propname,
586 const char *text_ctxt,
592 if (!ot || !ot->srna) {
594 ot ?
"operator missing srna" :
"unknown operator",
601 name, text_ctxt, ot->srna,
nullptr,
translate);
603 return layout->op_menu_enum(
C, ot, propname, text, icon);
606static void rna_uiItemL(Layout *layout,
608 const char *text_ctxt,
615 name, text_ctxt,
nullptr,
nullptr,
translate);
617 if (icon_value && !icon) {
621 layout->label(text.value_or(
""), icon);
624static void rna_layout_label_multiline(Layout *layout,
626 const char *text_ctxt,
635 name, text_ctxt,
nullptr,
nullptr,
translate);
636 if (icon_value && !icon) {
639 layout->label_multiline(text.value_or(
""), icon,
ui::FontStyleAlign(alignment), max_lines);
642static void rna_layout_label_markdown(Layout *layout,
644 const char *text_ctxt,
648 name, text_ctxt,
nullptr,
nullptr,
translate);
649 layout->label_markdown(text.value_or(
""));
652static void rna_layout_link(Layout *layout,
655 const char *text_ctxt,
662 name, text_ctxt,
nullptr,
nullptr,
translate);
664 if (icon_value && !icon) {
668 layout->link(url, text.value_or(
""), icon);
671static void rna_uiItemM(Layout *layout,
672 const char *menuname,
674 const char *text_ctxt,
681 name, text_ctxt,
nullptr,
nullptr,
translate);
683 if (icon_value && !icon) {
687 layout->menu(menuname, text, icon);
690static void rna_uiItemM_contents(Layout *layout,
const char *menuname)
692 layout->menu_contents(menuname);
695static void rna_uiItemPopoverPanel(Layout *layout,
697 const char *panel_type,
699 const char *text_ctxt,
707 name, text_ctxt,
nullptr,
nullptr,
translate);
709 if (icon_value && !icon) {
716static void rna_uiItemPopoverPanelFromGroup(Layout *layout,
721 const char *category)
723 layout->popover_group(
C, space_id, region_id, context, category);
726static void rna_uiItemProgress(Layout *layout,
728 const char *text_ctxt,
740static void rna_uiItemSeparator(Layout *layout,
float factor,
int type)
745static void rna_uiLayoutContextPointerSet(Layout *layout,
const char *name,
PointerRNA *ptr)
747 layout->context_ptr_set(name, ptr);
750static void rna_uiLayoutContextStringSet(Layout *layout,
const char *name,
const char *value)
752 layout->context_string_set(name, value);
755static void rna_uiLayoutSeparatorSpacer(Layout *layout)
757 layout->separator_spacer();
760static void rna_uiTemplateID(Layout *layout,
763 const char *propname,
766 const char *unlinkop,
768 const bool live_icon,
770 const char *text_ctxt,
784 name, text_ctxt,
nullptr, prop,
translate);
786 template_id(layout,
C, ptr, propname, newop, openop, unlinkop,
filter, live_icon, text);
789static void rna_ui_template_ID_session_uid(
795static void rna_uiTemplateAnyID(Layout *layout,
797 const char *propname,
798 const char *proptypename,
800 const char *text_ctxt,
814 name, text_ctxt,
nullptr, prop,
translate);
820static void rna_uiTemplateAction(Layout *layout,
824 const char *unlinkop,
826 const char *text_ctxt,
830 name, text_ctxt,
nullptr,
nullptr,
translate);
834static void rna_uiTemplateSearch(Layout *layout,
837 const char *propname,
839 const char *searchpropname,
841 const char *unlinkop,
843 const char *text_ctxt,
857 name, text_ctxt,
nullptr, prop,
translate);
859 template_search(layout,
C, ptr, propname, searchptr, searchpropname, newop, unlinkop, text);
862static void rna_uiTemplateSearchPreview(Layout *layout,
865 const char *propname,
867 const char *searchpropname,
869 const char *unlinkop,
871 const char *text_ctxt,
879 RNA_warning_bare(
"UILayout.template_search_preview(): property not found: %s.%s",
887 name, text_ctxt,
nullptr, prop,
translate);
890 layout,
C, ptr, propname, searchptr, searchpropname, newop, unlinkop, rows, cols, text);
893static void rna_uiTemplateFilePath(Layout *layout,
896 const char *propname,
897 const char *pathselect_op,
898 const char *filter_glob,
900 const char *text_ctxt,
902 const char *placeholder,
903 const bool split_name)
916 text, text_ctxt,
nullptr, prop,
translate);
917 std::optional<StringRefNull> placeholder_final = std::nullopt;
933void rna_template_list(Layout *layout,
935 const char *listtype_name,
938 const char *propname,
940 const char *active_propname,
941 const char *item_dyntip_propname,
944 const int layout_type,
946 const bool sort_reverse,
947 const bool sort_lock)
965 item_dyntip_propname,
972static void rna_template_cache_file(Layout *layout,
975 const char *propname)
980 RNA_warning_bare(
"UILayout.template_cache_file(): property not found: %s.%s",
989static void rna_template_cache_file_velocity(Layout *layout,
PointerRNA *ptr,
const char *propname)
999static void rna_template_cache_file_time_settings(Layout *layout,
1001 const char *propname)
1011static void rna_template_uilist_flags(Layout *layout,
1014 const char *propname)
1024static void rna_uiTemplatePathBuilder(Layout *layout,
1026 const char *propname,
1029 const char *text_ctxt,
1035 RNA_warning_bare(
"UILayout.template_path_builder(): property not found: %s.%s",
1043 name, text_ctxt,
nullptr, prop,
translate);
1049static void rna_template_event_from_keymap_item(
1054 name, text_ctxt,
nullptr,
nullptr,
translate);
1058static Layout *rna_uiLayoutBox(Layout *layout)
1060 return &layout->box();
1063static Layout *rna_uiLayoutSplit(Layout *layout,
float factor,
bool align)
1065 return &layout->split(factor, align);
1068static Layout *rna_uiLayoutRowWithHeading(
1069 Layout *layout,
bool align,
const char *heading,
const char *heading_ctxt,
bool translate)
1073 heading, heading_ctxt,
nullptr,
nullptr,
translate);
1074 return &layout->row(align, text.value_or(
""));
1077static Layout *rna_uiLayoutColumnWithHeading(
1078 Layout *layout,
bool align,
const char *heading,
const char *heading_ctxt,
bool translate)
1082 heading, heading_ctxt,
nullptr,
nullptr,
translate);
1083 return &layout->column(align, text.value_or(
""));
1086static Layout *rna_uiLayoutColumnFlow(Layout *layout,
int number,
bool align)
1088 return &layout->column_flow(number, align);
1091static Layout *rna_uiLayoutGridFlow(
1092 Layout *layout,
bool row_major,
int columns_len,
bool even_columns,
bool even_rows,
bool align)
1094 return &layout->grid_flow(row_major, columns_len, even_columns, even_rows, align);
1097static Layout *rna_uiLayoutMenuPie(Layout *layout)
1099 return &layout->menu_pie();
1102void rna_uiLayoutPanelProp(Layout *layout,
1106 const char *property,
1107 Layout **r_layout_header,
1108 Layout **r_layout_body)
1110 Panel *panel = layout->root_panel();
1111 if (panel ==
nullptr) {
1113 *r_layout_header =
nullptr;
1114 *r_layout_body =
nullptr;
1119 *r_layout_header = panel_layout.
header;
1120 *r_layout_body = panel_layout.body;
1123void rna_uiLayoutPanel(Layout *layout,
1127 const bool default_closed,
1128 Layout **r_layout_header,
1129 Layout **r_layout_body)
1131 Panel *panel = layout->root_panel();
1132 if (panel ==
nullptr) {
1134 *r_layout_header =
nullptr;
1135 *r_layout_body =
nullptr;
1139 *r_layout_header = panel_layout.
header;
1140 *r_layout_body = panel_layout.body;
1143static void rna_uiLayout_template_node_operator_registration_errors(Layout *layout,
1152static void rna_uiLayout_template_node_asset_menu_items(Layout *layout,
1154 const char *catalog_path,
1155 const int operator_type)
1161static void rna_uiLayout_template_node_operator_asset_menu_items(Layout *layout,
1163 const char *catalog_path)
1168static void rna_uiLayout_template_modifier_asset_menu_items(Layout *layout,
1170 const char *catalog_path,
1171 const bool skip_essentials)
1174 *
C, *layout,
StringRef(catalog_path), skip_essentials);
1177static void rna_uiLayout_template_node_operator_root_items(Layout *layout,
bContext *
C)
1187static const char *rna_ui_get_enum_name(
bContext *
C,
1189 const char *propname,
1190 const char *identifier)
1195 const char *name =
"";
1199 RNA_warning_bare(
"UILayout.enum_item_name(): Property not found or not an enum: %s.%s",
1210 name = items[
index].name;
1220static const char *rna_ui_get_enum_description(
bContext *
C,
1222 const char *propname,
1223 const char *identifier)
1228 const char *desc =
"";
1232 RNA_warning_bare(
"UILayout.enum_item_description(): Property not found or not an enum: %s.%s",
1243 desc = items[
index].description;
1253static int rna_ui_get_enum_icon(
bContext *
C,
1255 const char *propname,
1256 const char *identifier)
1261 int icon = ICON_NONE;
1265 RNA_warning_bare(
"UILayout.enum_item_icon(): Property not found or not an enum: %s.%s",
1276 icon = items[
index].icon;
1286void rna_uiTemplateAssetShelfPopover(Layout *layout,
1288 const char *asset_shelf_id,
1293 if (icon_value && !icon) {
1300PointerRNA rna_uiTemplatePopupConfirm(Layout *layout,
1304 const char *text_ctxt,
1307 const char *cancel_text,
1308 bool cancel_default)
1322 if (opname[0] ? (!ot || !ot->srna) :
false) {
1324 ot ?
"operator missing srna" :
"unknown operator",
1332 text, text_ctxt,
nullptr,
nullptr,
translate);
1333 std::optional<StringRefNull> cancel_text_str = cancel_text ? std::make_optional<StringRefNull>(
1336 if (cancel_text_str && !cancel_text_str->is_empty()) {
1341 layout, ot, text_str, cancel_text_str, icon, cancel_default, &opptr);
1346static int rna_uiTemplateRecentFiles(
ui::Layout *layout,
1349 const float project_ratio)
1367 "Label to insert into the layout for this sub-layout");
1373 "Override automatic translation context of the given heading");
1375 func,
"translate",
true,
"",
"Translate the given heading, when UI translation is enabled");
1385 "Override automatic translation context of the given text");
1388 func,
"translate",
true,
"",
"Translate the given text, when UI translation is enabled");
1395 prop =
RNA_def_string(func,
"text",
nullptr, 0,
"",
"Override automatic text of the item");
1414 parm =
RNA_def_string(func,
"operator",
nullptr, 0,
"",
"Identifier of the operator");
1428 parm =
RNA_def_pointer(func,
"data",
"AnyType",
"",
"Data from which to take property");
1430 parm =
RNA_def_string(func,
"property",
nullptr, 0,
"",
"Identifier of property in data");
1440 {0,
"NONE", 0,
"None",
""},
1441 {
'v',
"VECTOR", 0,
"Vector",
""},
1442 {
'c',
"COLOR", 0,
"Color",
""},
1443 {
'h',
"HUE", 0,
"Hue",
""},
1444 {0,
nullptr, 0,
nullptr,
nullptr},
1450 {0,
nullptr, 0,
nullptr,
nullptr},
1456 {0,
nullptr, 0,
nullptr,
nullptr},
1464 "Best guess at what type of separator is needed."},
1469 "Horizontal or Vertical empty space, depending on layout direction."},
1474 "Horizontal or Vertical line, depending on layout direction."},
1475 {0,
nullptr, 0,
nullptr,
nullptr},
1483 "Add a node to the active tree."},
1488 "Replace the selected nodes with the specified type."},
1489 {0,
nullptr, 0,
nullptr,
nullptr},
1495 {0,
nullptr, 0,
nullptr,
nullptr},
1498 static const float node_socket_color_default[] = {0.0f, 0.0f, 0.0f, 1.0f};
1502 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Sub-layout to put items in");
1507 "Sub-layout. Items placed in this sublayout are placed next to each other "
1509 RNA_def_boolean(func,
"align",
false,
"",
"Align buttons to each other");
1513 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Sub-layout to put items in");
1518 "Sub-layout. Items placed in this sublayout are placed under each other "
1520 RNA_def_boolean(func,
"align",
false,
"",
"Align buttons to each other");
1526 "Creates a collapsible panel. Whether it is open or closed is stored in the region using "
1527 "the given idname. This can only be used when the panel has the full width of the panel "
1528 "region available to it. So it can't be used in e.g. in a box or columns.");
1530 parm =
RNA_def_string(func,
"idname",
nullptr, 0,
"",
"Identifier of the panel");
1536 "When true, the panel will be open the first time it is shown");
1537 parm =
RNA_def_pointer(func,
"layout_header",
"UILayout",
"",
"Sub-layout to put items in");
1544 "Sub-layout to put items in. Will be none if the panel is collapsed.");
1550 "Similar to ``.panel(...)`` but instead of storing whether it is open or closed in the "
1551 "region, it is stored in the provided boolean property. This should be used when multiple "
1552 "instances of the same panel can exist. For example one for every item in a collection "
1553 "property or list. This can only be used when the panel has the full width of the panel "
1554 "region available to it. So it can't be used in e.g. in a box or columns.");
1557 func,
"data",
"AnyType",
"",
"Data from which to take the open-state property");
1565 "Identifier of the boolean property that determines whether the panel is open or closed");
1572 "Sub-layout to put items in. Will be none if the property does not exists.");
1578 "Sub-layout to put items in. Will be none if the panel is collapsed.");
1583 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Sub-layout to put items in");
1586 RNA_def_boolean(func,
"align",
false,
"",
"Align buttons to each other");
1589 RNA_def_boolean(func,
"row_major",
false,
"",
"Fill row by row, instead of column by column");
1597 "Number of columns, positive are absolute fixed numbers, 0 is automatic, negative are "
1598 "automatic multiple numbers along major axis (e.g. -2 will only produce 2, 4, 6 etc. "
1599 "columns for row major layout, and 2, 4, 6 etc. rows for column major layout).",
1602 RNA_def_boolean(func,
"even_columns",
false,
"",
"All columns will have the same width");
1603 RNA_def_boolean(func,
"even_rows",
false,
"",
"All rows will have the same height");
1604 RNA_def_boolean(func,
"align",
false,
"",
"Align buttons to each other");
1605 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Sub-layout to put items in");
1611 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Sub-layout to put items in");
1615 "Sublayout (items placed in this sublayout are placed "
1616 "under each other in a column and are surrounded by a box)");
1620 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Sub-layout to put items in");
1629 "Percentage of width to split at (leave unset for automatic calculation)",
1632 RNA_def_boolean(func,
"align",
false,
"",
"Align buttons to each other");
1636 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Sub-layout to put items in");
1640 "Sublayout. Items placed in this sublayout are placed "
1641 "in a radial fashion around the menu center).");
1648 parm =
RNA_def_pointer(func,
"data",
"AnyType",
"",
"Data from which to take the icon");
1651 "Return the custom icon for this data, "
1652 "use it e.g. to get materials or texture icons.");
1656 parm =
RNA_def_string(func,
"name",
nullptr, 0,
"",
"UI name of the enum item");
1660 parm =
RNA_def_string(func,
"identifier",
nullptr, 0,
"",
"Identifier of the enum item");
1664 func =
RNA_def_function(srna,
"enum_item_description",
"rna_ui_get_enum_description");
1665 parm =
RNA_def_string(func,
"description",
nullptr, 0,
"",
"UI description of the enum item");
1669 parm =
RNA_def_string(func,
"identifier",
nullptr, 0,
"",
"Identifier of the enum item");
1678 parm =
RNA_def_string(func,
"identifier",
nullptr, 0,
"",
"Identifier of the enum item");
1685 "Exposes an RNA string property in the layout using a text-box "
1686 "widget with multi-line support. Text-box state will be stored "
1687 "in the current context region.");
1692 func,
"initial_visible_lines", 3, 1,
INT_MAX,
"Initial Visible Lines",
"", 1,
INT_MAX);
1694 func,
"placeholder",
nullptr, 0,
"",
"Hint describing the expected value when empty");
1697 func =
RNA_def_function(srna,
"textbox_with_state",
"rna_uiItemTextBoxWithState");
1699 "Exposes an RNA string property in the layout using a text-box "
1700 "widget with multi-line support");
1707 "Pointer to a pre-allocated text-box state storage (builtin)");
1710 func,
"placeholder",
nullptr, 0,
"",
"Hint describing the expected value when empty");
1715 "Item. Exposes an RNA item and places it into the layout.");
1719 func,
"placeholder",
nullptr, 0,
"",
"Hint describing the expected value when empty");
1721 RNA_def_boolean(func,
"expand",
false,
"",
"Expand button to show more detail");
1722 RNA_def_boolean(func,
"slider",
false,
"",
"Use slider widget for numeric values");
1729 "Use toggle widget for boolean values, "
1730 "or a checkbox when disabled "
1731 "(the default is -1 which uses toggle only when an icon is displayed)",
1734 RNA_def_boolean(func,
"icon_only",
false,
"",
"Draw only icons in buttons, no text");
1735 RNA_def_boolean(func,
"event",
false,
"",
"Use button to input key events");
1737 func,
"full_event",
false,
"",
"Use button to input full events including modifiers");
1742 "Draw the button itself, not just the icon/text. When false, corresponds to the "
1743 "'NONE_OR_STATUS' layout emboss type.");
1751 "The index of this button, when set a single member of an array can be accessed, "
1752 "when set to -1 all array members are used",
1757 RNA_def_boolean(func,
"invert_checkbox",
false,
"",
"Draw checkbox value inverted");
1761 {0,
nullptr, 0,
nullptr,
nullptr},
1763 parm =
RNA_def_enum(func,
"text_align", rna_enum_prop_align, 0,
"",
"Text alignment");
1772 func =
RNA_def_function(srna,
"prop_with_popover",
"rna_uiItemR_with_popover");
1775 RNA_def_boolean(func,
"icon_only",
false,
"",
"Draw only icons in tabs, no text");
1776 parm =
RNA_def_string(func,
"panel",
nullptr, 0,
"",
"Identifier of the panel");
1782 RNA_def_boolean(func,
"icon_only",
false,
"",
"Draw only icons in tabs, no text");
1783 parm =
RNA_def_string(func,
"menu",
nullptr, 0,
"",
"Identifier of the menu");
1790 func,
"data_highlight",
"AnyType",
"",
"Data from which to take highlight property");
1793 func,
"property_highlight",
nullptr, 0,
"",
"Identifier of highlight property in data");
1794 RNA_def_boolean(func,
"icon_only",
false,
"",
"Draw only icons in tabs, no text");
1799 {0,
nullptr, 0,
nullptr,
nullptr},
1803 rna_enum_prop_tabs_enum_expand_as,
1810 parm =
RNA_def_string(func,
"value",
nullptr, 0,
"",
"Enum property value");
1817 func,
"search_data",
"AnyType",
"",
"Data from which to take collection to search in");
1820 func,
"search_property",
nullptr, 0,
"",
"Identifier of search collection property");
1824 func,
"results_are_suggestions",
false,
"",
"Accept inputs that do not match any item");
1826 "item_search_property",
1830 "Identifier of the string property in each collection's items to use for "
1831 "searching (defaults to the items' type 'name property')");
1842 "The index of this button, when set a single member of an array can be accessed, "
1843 "when set to -1 all array members are used",
1847 for (
int is_menu_hold = 0; is_menu_hold < 2; is_menu_hold++) {
1848 func = (is_menu_hold) ?
RNA_def_function(srna,
"operator_menu_hold",
"rna_uiItemOMenuHold") :
1851 RNA_def_boolean(func,
"emboss",
true,
"",
"Draw the button itself, not just the icon/text");
1856 parm =
RNA_def_string(func,
"menu",
nullptr, 0,
"",
"Identifier of the menu");
1866 "Influences the sorting when using menu-search",
1871 func,
"properties",
"OperatorProperties",
"",
"Operator properties to fill in");
1875 "Item. Places a button into the layout to call an Operator.");
1879 parm =
RNA_def_string(func,
"operator",
nullptr, 0,
"",
"Identifier of the operator");
1881 parm =
RNA_def_string(func,
"property",
nullptr, 0,
"",
"Identifier of property in operator");
1883 RNA_def_boolean(func,
"icon_only",
false,
"",
"Draw only icons in buttons, no text");
1885 func =
RNA_def_function(srna,
"operator_menu_enum",
"rna_uiItemMenuEnumO");
1889 parm =
RNA_def_string(func,
"property",
nullptr, 0,
"",
"Identifier of property in operator");
1893 func,
"properties",
"OperatorProperties",
"",
"Operator properties to fill in");
1903 func =
RNA_def_function(srna,
"label_multiline",
"rna_layout_label_multiline");
1908 parm =
RNA_def_enum(func,
"alignment", rna_enum_text_align, 0,
"",
"");
1913 func =
RNA_def_function(srna,
"label_markdown",
"rna_layout_label_markdown");
1916 "Displays markdown-formatted text in the layout. Only a subset of markdown is supported "
1917 "including headers, lists, bold/italic/code text, links, quotes, horizontal rules.");
1924 prop =
RNA_def_string(func,
"text",
nullptr, 0,
"",
"Override automatic text of the item");
1934 parm =
RNA_def_string(func,
"menu",
nullptr, 0,
"",
"Identifier of the menu");
1941 parm =
RNA_def_string(func,
"menu",
nullptr, 0,
"",
"Identifier of the menu");
1946 parm =
RNA_def_string(func,
"panel",
nullptr, 0,
"",
"Identifier of the panel");
1957 "The direction in which the popup panel is drawn relative to button position");
1959 func =
RNA_def_function(srna,
"popover_group",
"rna_uiItemPopoverPanelFromGroup");
1966 parm =
RNA_def_string(func,
"context",
nullptr, 0,
"",
"panel type context");
1968 parm =
RNA_def_string(func,
"category",
nullptr, 0,
"",
"panel type category");
1973 "Item. Inserts empty space into the layout between items.");
1980 "Percentage of width to space (leave unset for default space)",
1985 rna_enum_separator_type_items,
1988 "The type of the separator");
1990 func =
RNA_def_function(srna,
"separator_spacer",
"rna_uiLayoutSeparatorSpacer");
1992 func,
"Item. Inserts horizontal spacing empty space into the layout between items.");
2003 "Amount of progress from 0.0f to 1.0f",
2008 progress_type_items,
2011 "The type of progress indicator");
2014 func =
RNA_def_function(srna,
"context_pointer_set",
"rna_uiLayoutContextPointerSet");
2015 parm =
RNA_def_string(func,
"name",
nullptr, 0,
"Name",
"Name of entry in the context");
2017 parm =
RNA_def_pointer(func,
"data",
"AnyType",
"",
"Pointer to put in context");
2020 func =
RNA_def_function(srna,
"context_string_set",
"rna_uiLayoutContextStringSet");
2021 parm =
RNA_def_string(func,
"name",
nullptr, 0,
"Name",
"Name of entry in the context");
2023 parm =
RNA_def_string(func,
"value",
nullptr, 0,
"Value",
"String to put in context");
2034 RNA_def_string(func,
"new",
nullptr, 0,
"",
"Operator identifier to create a new ID block");
2040 "Operator identifier to open a file for creating a new ID block");
2041 RNA_def_string(func,
"unlink",
nullptr, 0,
"",
"Operator identifier to unlink the ID block");
2044 id_template_filter_items,
2047 "Optionally limit the items which can be selected");
2048 RNA_def_boolean(func,
"live_icon",
false,
"",
"Show preview instead of fixed icon");
2051 func =
RNA_def_function(srna,
"template_ID_session_uid",
"rna_ui_template_ID_session_uid");
2053 "Template ID search menu button for session_uid Int properties");
2061 func =
RNA_def_function(srna,
"template_ID_preview",
"template_id_preview");
2064 RNA_def_string(func,
"new",
nullptr, 0,
"",
"Operator identifier to create a new ID block");
2070 "Operator identifier to open a file for creating a new ID block");
2071 RNA_def_string(func,
"unlink",
nullptr, 0,
"",
"Operator identifier to unlink the ID block");
2073 func,
"rows", 0, 0,
INT_MAX,
"Number of thumbnail preview rows to display",
"", 0,
INT_MAX);
2079 "Number of thumbnail preview columns to display",
2085 id_template_filter_items,
2088 "Optionally limit the items which can be selected");
2089 RNA_def_boolean(func,
"hide_buttons",
false,
"",
"Show only list, no buttons");
2094 "Insert a readonly Matrix UI. "
2095 "The UI displays the matrix components - translation, rotation and scale. "
2096 "The **property** argument must be the identifier of an existing 4x4 float vector "
2097 "property of subtype 'MATRIX'.");
2101 parm =
RNA_def_pointer(func,
"data",
"AnyType",
"",
"Data from which to take property");
2103 parm =
RNA_def_string(func,
"property",
nullptr, 0,
"",
"Identifier of property in data");
2110 "Identifier of property in data giving the type of the ID-blocks to use");
2117 RNA_def_string(func,
"new",
nullptr, 0,
"",
"Operator identifier to create a new ID block");
2118 RNA_def_string(func,
"menu",
nullptr, 0,
"",
"Context menu identifier");
2121 id_template_filter_items,
2124 "Optionally limit the items which can be selected");
2128 parm =
RNA_def_pointer(func,
"id",
"ID",
"",
"The data-block for which to select an Action");
2130 RNA_def_string(func,
"new",
nullptr, 0,
"",
"Operator identifier to create a new ID block");
2131 RNA_def_string(func,
"unlink",
nullptr, 0,
"",
"Operator identifier to unlink the ID block");
2138 func,
"search_data",
"AnyType",
"",
"Data from which to take collection to search in");
2141 func,
"search_property",
nullptr, 0,
"",
"Identifier of search collection property");
2144 func,
"new",
nullptr, 0,
"",
"Operator identifier to create a new item for the collection");
2150 "Operator identifier to unlink or delete the active "
2151 "item from the collection");
2154 func =
RNA_def_function(srna,
"template_search_preview",
"rna_uiTemplateSearchPreview");
2158 func,
"search_data",
"AnyType",
"",
"Data from which to take collection to search in");
2161 func,
"search_property",
nullptr, 0,
"",
"Identifier of search collection property");
2164 func,
"new",
nullptr, 0,
"",
"Operator identifier to create a new item for the collection");
2170 "Operator identifier to unlink or delete the active "
2171 "item from the collection");
2174 func,
"rows", 0, 0,
INT_MAX,
"Number of thumbnail preview rows to display",
"", 0,
INT_MAX);
2180 "Number of thumbnail preview columns to display",
2185 func =
RNA_def_function(srna,
"template_filepath",
"rna_uiTemplateFilePath");
2188 "Define a file or directory path text widget, with a button to "
2189 "its right to open a filebrowser. Only for String properties "
2190 "with a Filepath or Dirpath subtype.");
2197 "Operator identifier to select a filepath (if unset, the relevant generic "
2198 "path selection operator is used)");
2205 "If set, controls which file extensions are shown in the filebrowser, for "
2206 "Filepath properties only (e.g. '*.glb;*.gltf')");
2214 "Placeholder text to display in the text widget when no path is set");
2220 "Edit the parent directory and the file or directory name in separate text "
2223 func =
RNA_def_function(srna,
"template_path_builder",
"rna_uiTemplatePathBuilder");
2224 parm =
RNA_def_pointer(func,
"data",
"AnyType",
"",
"Data from which to take property");
2226 parm =
RNA_def_string(func,
"property",
nullptr, 0,
"",
"Identifier of property in data");
2228 parm =
RNA_def_pointer(func,
"root",
"ID",
"",
"ID-block from which path is evaluated from");
2236 func =
RNA_def_function(srna,
"template_strip_modifiers",
"template_strip_modifiers");
2241 srna,
"template_scene_compositor_effects",
"template_scene_compositor_effects");
2244 func,
"Generates the UI layout for the scene compositor effects stack");
2246 func =
RNA_def_function(srna,
"template_collection_importer",
"template_collection_importer");
2250 func =
RNA_def_function(srna,
"template_collection_exporters",
"template_collection_exporters");
2254 func =
RNA_def_function(srna,
"template_constraints",
"template_constraints");
2258 "use_bone_constraints",
2261 "Add panels for bone constraints instead of object constraints");
2268 srna,
"template_greasepencil_color",
"template_greasepencil_color_preview");
2272 func,
"rows", 0, 0,
INT_MAX,
"Number of thumbnail preview rows to display",
"", 0,
INT_MAX);
2278 "Number of thumbnail preview columns to display",
2282 RNA_def_float(func,
"scale", 1.0f, 0.1f, 1.5f,
"Scale of the image thumbnails",
"", 0.5f, 1.0f);
2285 id_template_filter_items,
2288 "Optionally limit the items which can be selected");
2290 func =
RNA_def_function(srna,
"template_constraint_header",
"template_constraint_header");
2292 parm =
RNA_def_pointer(func,
"data",
"Constraint",
"",
"Constraint data");
2297 func,
"Item. A preview window for materials, textures, lights or worlds.");
2301 RNA_def_boolean(func,
"show_buttons",
true,
"",
"Show preview buttons?");
2310 "Identifier of this preview widget, if not set the ID type will be used "
2311 "(i.e. all previews of materials without explicit ID will have the same size...).");
2313 func =
RNA_def_function(srna,
"template_curve_mapping",
"template_curve_mapping");
2315 func,
"Item. A curve mapping widget used for e.g falloff curves for lights.");
2318 RNA_def_boolean(func,
"levels",
false,
"",
"Show black/white levels");
2320 RNA_def_boolean(func,
"use_negative_slope",
false,
"",
"Use a negative slope by default");
2322 RNA_def_boolean(func,
"show_presets",
false,
"",
"Show preset options");
2324 func =
RNA_def_function(srna,
"template_curveprofile",
"template_curve_profile");
2328 func =
RNA_def_function(srna,
"template_color_ramp",
"template_color_ramp");
2331 RNA_def_boolean(func,
"expand",
false,
"",
"Expand button to show more detail");
2343 "Scale the icon size (by the button size)",
2350 RNA_def_boolean(func,
"show_labels",
false,
"",
"Show enum label in preview buttons");
2357 "Scale the button icon size (by the button size)",
2366 "Scale the popup icon size (by the button size)",
2378 func =
RNA_def_function(srna,
"template_vectorscope",
"template_vectorscope");
2385 func,
"used_layers_data",
"AnyType",
"",
"Data from which to take property");
2388 func,
"used_layers_property",
nullptr, 0,
"",
"Identifier of property in data");
2393 func =
RNA_def_function(srna,
"template_color_picker",
"template_color_picker");
2397 func,
"value_slider",
false,
"",
"Display the value slider to the right of the color wheel");
2402 "Lock the color wheel display to value 1.0 regardless of actual color");
2404 func,
"lock_luminosity",
false,
"",
"Keep the color at its original vector length");
2405 RNA_def_boolean(func,
"cubic",
false,
"",
"Cubic saturation for picking values close to white");
2411 func =
RNA_def_function(srna,
"template_image_layers",
"uiTemplateImageLayers");
2413 parm =
RNA_def_pointer(func,
"image",
"Image",
"",
"Image data-block to display layers for");
2415 parm =
RNA_def_pointer(func,
"image_user",
"ImageUser",
"",
"Image user reading from the image");
2420 func,
"Item(s). User interface for selecting images and their source paths.");
2425 RNA_def_boolean(func,
"compact",
false,
"",
"Use more compact layout");
2426 RNA_def_boolean(func,
"multiview",
false,
"",
"Expose Multi-View options");
2428 func =
RNA_def_function(srna,
"template_image_settings",
"uiTemplateImageSettings");
2431 parm =
RNA_def_pointer(func,
"image_settings",
"ImageFormatSettings",
"",
"");
2433 RNA_def_boolean(func,
"color_management",
false,
"",
"Show color management settings");
2435 func =
RNA_def_function(srna,
"template_image_stereo_3d",
"uiTemplateImageStereo3d");
2437 parm =
RNA_def_pointer(func,
"stereo_3d_format",
"Stereo3dFormat",
"",
"");
2440 func =
RNA_def_function(srna,
"template_image_views",
"uiTemplateImageViews");
2442 parm =
RNA_def_pointer(func,
"image_settings",
"ImageFormatSettings",
"",
"");
2445 func =
RNA_def_function(srna,
"template_movieclip",
"uiTemplateMovieClip");
2447 func,
"Item(s). User interface for selecting movie clips and their source paths.");
2450 RNA_def_boolean(func,
"compact",
false,
"",
"Use more compact layout");
2463 RNA_def_boolean(func,
"compact",
false,
"",
"Use more compact layout");
2466 srna,
"template_movieclip_information",
"uiTemplateMovieclipInformation");
2476 func,
"listtype_name",
nullptr, 0,
"",
"Identifier of the list type to use");
2484 "Identifier of this list widget. Necessary to tell apart different list widgets. Mandatory "
2487 "If this not an empty string, the uilist gets a custom ID, otherwise it takes the "
2488 "name of the class used to define the uilist (for example, if the "
2489 "class name is \"OBJECT_UL_vgroups\", and list_id is not set by the "
2490 "script, then bl_idname = \"OBJECT_UL_vgroups\")");
2493 func,
"dataptr",
"AnyType",
"",
"Data from which to take the Collection property");
2496 func,
"propname",
nullptr, 0,
"",
"Identifier of the Collection property in data");
2502 "Data from which to take the integer property, index of the active item");
2510 "Identifier of the integer property in active_data, index of the active item");
2513 "item_dyntip_propname",
2517 "Identifier of a string property in items, to use as tooltip content");
2524 "Default and minimum number of rows to display",
2528 func,
"maxrows", 5, 0,
INT_MAX,
"",
"Default maximum number of rows to display", 0,
INT_MAX);
2534 "Type of layout to use");
2541 "Number of items to display per row, for GRID layout",
2545 "Unused but kept for compatibility reasons. Setting the parameter "
2546 "has no effect, there will always be a single column.",
2549 RNA_def_boolean(func,
"sort_reverse",
false,
"",
"Display items in reverse order by default");
2550 RNA_def_boolean(func,
"sort_lock",
false,
"",
"Lock display order to default value");
2552 func =
RNA_def_function(srna,
"template_running_jobs",
"template_running_jobs");
2555 RNA_def_function(srna,
"template_operator_search",
"uiTemplateOperatorSearch");
2558 func =
RNA_def_function(srna,
"template_header_3D_mode",
"template_header3D_mode");
2562 func =
RNA_def_function(srna,
"template_edit_mode_selection",
"uiTemplateEditModeSelection");
2565 func,
"Inserts common 3DView Edit modes header UI (selector for selection mode)");
2567 func =
RNA_def_function(srna,
"template_reports_banner",
"uiTemplateReportsBanner");
2570 func =
RNA_def_function(srna,
"template_input_status",
"uiTemplateInputStatus");
2573 func =
RNA_def_function(srna,
"template_status_info",
"uiTemplateStatusInfo");
2578 parm =
RNA_def_pointer(func,
"ntree",
"NodeTree",
"",
"Node tree containing the node");
2580 parm =
RNA_def_pointer(func,
"node",
"Node",
"",
"Node owning the socket");
2582 parm =
RNA_def_pointer(func,
"socket",
"NodeSocket",
"",
"Socket to display the link for");
2587 parm =
RNA_def_pointer(func,
"ntree",
"NodeTree",
"",
"Node tree containing the node");
2591 parm =
RNA_def_pointer(func,
"socket",
"NodeSocket",
"",
"Socket to display");
2595 "template_node_operator_registration_errors",
2596 "rna_uiLayout_template_node_operator_registration_errors");
2600 srna,
"template_node_asset_menu_items",
"rna_uiLayout_template_node_asset_menu_items");
2605 rna_enum_template_node_operator_type,
2608 "The operator the asset menu will use");
2611 "template_modifier_asset_menu_items",
2612 "rna_uiLayout_template_modifier_asset_menu_items");
2618 "template_node_operator_asset_menu_items",
2619 "rna_uiLayout_template_node_operator_asset_menu_items");
2624 "template_node_operator_asset_root_items",
2625 "rna_uiLayout_template_node_operator_root_items");
2628 func =
RNA_def_function(srna,
"template_texture_user",
"uiTemplateTextureUser");
2632 srna,
"template_keymap_item_properties",
"uiTemplateKeymapItemProperties");
2636 func =
RNA_def_function(srna,
"template_component_menu",
"template_component_menu");
2638 parm =
RNA_def_pointer(func,
"data",
"AnyType",
"",
"Data from which to take property");
2640 parm =
RNA_def_string(func,
"property",
nullptr, 0,
"",
"Identifier of property in data");
2645 func =
RNA_def_function(srna,
"template_colorspace_settings",
"template_colorspace_settings");
2650 srna,
"template_colormanaged_view_settings",
"template_colormanaged_view_settings");
2656 "show_global_settings",
2659 "Show widgets to control global color management settings");
2663 func =
RNA_def_function(srna,
"template_node_socket",
"template_node_socket");
2667 func,
"color", 4, node_socket_color_default, 0.0f, 1.0f,
"Color",
"", 0.0f, 1.0f);
2669 func =
RNA_def_function(srna,
"template_cache_file",
"rna_template_cache_file");
2671 func,
"Item(s). User interface for selecting cache files and their source paths");
2676 srna,
"template_cache_file_velocity",
"rna_template_cache_file_velocity");
2681 srna,
"template_cache_file_time_settings",
"rna_template_cache_file_time_settings");
2685 func =
RNA_def_function(srna,
"template_cache_file_layers",
"rna_template_uilist_flags");
2690 func =
RNA_def_function(srna,
"template_recent_files",
"rna_uiTemplateRecentFiles");
2692 func,
"Show list of recently saved .blend files, with active project files first");
2699 "Files to show, with rows distributed as if showing all files");
2706 "Ratio of rows reserved for project files, relative to other recent files",
2712 func =
RNA_def_function(srna,
"template_recent_projects",
"template_recent_projects");
2718 func =
RNA_def_function(srna,
"template_project_splash",
"template_project_splash");
2721 func,
"Show the splash artwork of the active project, with buttons to set and clear it");
2723 func =
RNA_def_function(srna,
"template_file_select_path",
"template_file_select_path");
2725 "Item. A text button to set the active file browser path.");
2727 func,
"params",
"FileSelectParams",
"",
"File browser parameters whose path is edited");
2732 srna,
"template_event_from_keymap_item",
"rna_template_event_from_keymap_item");
2741 srna,
"template_light_linking_collection",
"template_light_linking_collection");
2743 "Visualization of a content of a light linking collection");
2749 "Layout to set active list element as context properties");
2753 func =
RNA_def_function(srna,
"template_bone_collection_tree",
"template_bone_collection_tree");
2758 srna,
"template_project_asset_libraries_tree",
"template_project_asset_libraries_tree");
2763 srna,
"template_grease_pencil_layer_tree",
"template_grease_pencil_layer_tree");
2767 func =
RNA_def_function(srna,
"template_node_tree_interface",
"template_tree_interface");
2772 "NodeTreeInterface",
2773 "Node Tree Interface",
2774 "Interface of a node tree to display");
2777 func =
RNA_def_function(srna,
"template_node_inputs",
"template_node_inputs");
2780 parm =
RNA_def_pointer(func,
"node",
"Node",
"Node",
"Display inputs of this node");
2784 srna,
"template_compositor_strip_inputs",
"template_compositor_strip_inputs");
2786 func,
"Show the compositor node group input values for a compositor effect strip");
2788 parm =
RNA_def_pointer(func,
"strip",
"Strip",
"Strip",
"Compositor effect strip");
2791 func =
RNA_def_function(srna,
"template_asset_shelf_popover",
"rna_uiTemplateAssetShelfPopover");
2799 "Identifier of the asset shelf to display (``bl_idname``)");
2802 func,
"name",
nullptr, 0,
"",
"Optional name to indicate the active asset");
2811 func =
RNA_def_function(srna,
"template_popup_confirm",
"rna_uiTemplatePopupConfirm");
2818 "Optional text to use for the cancel, not shown when an empty string");
2819 RNA_def_boolean(func,
"cancel_default",
false,
"",
"Cancel button by default");
2821 func,
"Add confirm & cancel buttons into a popup which will close the popup when pressed");
2825 func,
"properties",
"OperatorProperties",
"",
"Operator properties to fill in");
2829 func =
RNA_def_function(srna,
"template_shape_key_tree",
"ed::object::shapekey::template_tree");
#define BLT_I18NCONTEXT_DEFAULT
#define RNA_warning_bare(format,...)
#define UI_UL_DEFAULT_CLASS_NAME
float4x4 translate(float4x4 mat, float3 translation)
void free(Subdiv *subdiv)
void ui_template_node_operator_asset_root_items(ui::Layout &layout, const bContext &C)
void ui_template_node_operator_asset_menu_items(ui::Layout &layout, const bContext &C, const StringRef path)
void ui_template_node_operator_registration_errors(ui::Layout &layout, const StringRefNull idname_py)
void ui_template_modifier_asset_menu_items(const bContext &C, ui::Layout &layout, StringRef catalog_path, bool skip_essentials)
void ui_template_node_asset_menu_items(ui::Layout &layout, const bContext &C, StringRef catalog_path, const ui::NodeAssetMenuOperatorType operator_type)
void template_action(Layout *layout, const bContext *C, ID *id, const char *newop, const char *unlinkop, std::optional< StringRef > text)
void template_filepath(Layout *layout, const bContext *C, PointerRNA *ptr, const StringRefNull propname, const char *pathselect_op, const char *filter_glob, const std::optional< StringRef > name, const std::optional< StringRef > placeholder, bool split_name=false)
void template_ID_session_uid(Layout &layout, bContext *C, PointerRNA *ptr, StringRefNull propname, short idcode)
bool template_cache_file_pointer(PointerRNA *ptr, StringRefNull propname, PointerRNA *r_file_ptr)
void template_search_preview(Layout *layout, bContext *C, PointerRNA *ptr, StringRefNull propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, int rows, int cols, std::optional< StringRef > text=std::nullopt)
void popup_block_template_confirm_op(Layout *layout, wmOperatorType *ot, std::optional< StringRef > confirm_text, std::optional< StringRef > cancel_text, const int icon, bool cancel_default, PointerRNA *r_ptr)
@ TEMPLATE_LIST_SORT_REVERSE
@ TEMPLATE_LIST_SORT_LOCK
@ TEMPLATE_LIST_FLAG_NONE
NodeAssetMenuOperatorType
void template_uilist_flags(Layout *layout, const bContext *C, PointerRNA *fileptr)
int template_recent_files(Layout *layout, int rows, RecentFilesFilter filter=RecentFilesFilter::All, float project_ratio=0.5f)
void template_uilist(Layout *layout, const bContext *C, const char *listtype_name, const char *list_id, PointerRNA *dataptr, StringRefNull propname, PointerRNA *active_dataptr, StringRefNull active_propname, const char *item_dyntip_propname, int rows, int maxrows, int layout_type, enum TemplateListFlags flags)
void template_id(Layout *layout, const bContext *C, PointerRNA *ptr, StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=TEMPLATE_ID_FILTER_ALL, bool live_icon=false, std::optional< StringRef > text=std::nullopt)
void template_cache_file(Layout *layout, const bContext *C, PointerRNA *ptr, StringRefNull propname)
void template_cache_file_time_settings(Layout *layout, PointerRNA *fileptr)
bool template_event_from_keymap_item(Layout *layout, StringRefNull text, const wmKeyMapItem *kmi, bool text_fallback)
void template_cache_file_velocity(Layout *layout, PointerRNA *fileptr)
void template_search(Layout *layout, const bContext *C, PointerRNA *ptr, StringRefNull propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, std::optional< StringRef > text=std::nullopt)
@ TEMPLATE_ID_FILTER_AVAILABLE
int icon_from_rnaptr(const bContext *C, PointerRNA *ptr, int rnaicon, bool big)
bool popup_block_template_confirm_is_supported(const Block *block)
void template_any_id(Layout *layout, PointerRNA *ptr, StringRefNull propname, StringRefNull proptypename, std::optional< StringRef > text)
void template_path_builder(Layout *layout, PointerRNA *ptr, StringRefNull propname, PointerRNA *root_ptr, std::optional< StringRefNull > text)
void template_asset_shelf_popover(Layout &layout, const bContext &C, StringRefNull asset_shelf_id, StringRef name, int icon)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_deprecated(PropertyRNA *prop, const char *note, const short version, const short removal_version)
const EnumPropertyItem rna_enum_id_type_items[]
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
const EnumPropertyItem rna_enum_space_type_items[]
PropertyRNA * RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
static void api_ui_item_op(FunctionRNA *func)
const char * RNA_property_translation_context(const PropertyRNA *prop)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
static void api_ui_item_common_heading(FunctionRNA *func)
std::optional< StringRefNull > rna_translate_ui_text(const char *text, const char *text_ctxt, StructRNA *type, PropertyRNA *prop, bool translate)
static const EnumPropertyItem recent_files_filter_items[]
bool RNA_property_array_check(PropertyRNA *prop)
static const EnumPropertyItem curve_type_items[]
static void api_ui_item_common_text(FunctionRNA *func)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
PropertyType RNA_property_type(PropertyRNA *prop)
static void api_ui_item_rna_common(FunctionRNA *func)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
int RNA_enum_from_identifier(const EnumPropertyItem *item, const char *identifier)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
const char * BLT_pgettext(const char *msgctxt, const char *msgid)
BMesh const char void * data
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
static const EnumPropertyItem popup_draw_direction_items[]
void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
static void api_ui_item_common(FunctionRNA *func)
int RNA_struct_ui_icon(const StructRNA *type)
void api_ui_item_common_translation(FunctionRNA *func)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
const char * RNA_struct_identifier(const StructRNA *type)
const EnumPropertyItem rna_enum_region_type_items[]
PropertySubType RNA_property_subtype(PropertyRNA *prop)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void RNA_def_function_flag(FunctionRNA *func, FunctionFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
static void api_ui_item_op_common(FunctionRNA *func)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void RNA_api_ui_layout(StructRNA *srna)
const EnumPropertyItem rna_enum_uilist_layout_type_items[]
bool BLT_translate_iface()
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem rna_enum_icon_items[]
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
const char * RNA_struct_translation_context(const StructRNA *type)