42 {0,
nullptr, 0,
nullptr,
nullptr},
49 {0,
nullptr, 0,
nullptr,
nullptr},
108 func = &rna_Panel_poll_func;
115 visible = *(
bool *)
ret;
131 func = &rna_Panel_draw_func;
149 func = &rna_Panel_draw_header_func;
158static void panel_draw_header_preset(
const bContext *
C,
Panel *panel)
160 extern FunctionRNA rna_Panel_draw_header_preset_func;
167 func = &rna_Panel_draw_header_preset_func;
176static void panel_type_clear_recursive(
Panel *panel,
const PanelType *type)
178 if (panel->
type == type) {
179 panel->
type =
nullptr;
183 panel_type_clear_recursive(child_panel, type);
187static bool rna_Panel_unregister(
Main *bmain,
StructRNA *type)
212 child_pt->
parent =
nullptr;
218 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase;
221 panel_type_clear_recursive(panel, pt);
242 const char *identifier,
247 const char *error_prefix =
RPT_(
"Registering panel class:");
249 PanelType *pt, *parent =
nullptr, dummy_pt = {
nullptr};
250 Panel dummy_panel = {
nullptr};
251 bool have_function[4];
252 size_t over_alloc = 0;
254 size_t description_size = 0;
257 dummy_panel.
type = &dummy_pt;
258 _panel_descr[0] =
'\0';
266 if (validate(&dummy_panel_ptr,
data, have_function) != 0) {
270 if (strlen(identifier) >=
sizeof(dummy_pt.idname)) {
273 "%s '%s' is too long, maximum length is %d",
276 int(
sizeof(dummy_pt.idname)));
281 if (dummy_pt.category[0] ==
'\0') {
285 printf(
"%s '%s' misses category, please update the script\n", error_prefix, dummy_pt.idname);
290 if (dummy_pt.category[0] !=
'\0') {
294 "%s '%s' has category '%s'",
303 if (!(art = region_type_find(
reports, dummy_pt.space_type, dummy_pt.region_type))) {
315 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
319 if (!rna_Panel_unregister(bmain, srna)) {
322 "%s '%s', bl_idname '%s' could not be unregistered",
333 if (dummy_pt.parent_id[0] && (parent ==
nullptr)) {
334 for (pt = pt_next; pt; pt = pt->
next) {
345 if (dummy_pt.parent_id[0] &&
STREQ(pt->
idname, dummy_pt.parent_id)) {
356 if (dummy_pt.parent_id[0] && !parent) {
359 "%s parent '%s' for '%s' not found",
367 if (_panel_descr[0]) {
368 description_size = strlen(_panel_descr) + 1;
369 over_alloc += description_size;
373 memcpy(pt, &dummy_pt,
sizeof(dummy_pt));
375 if (_panel_descr[0]) {
376 char *buf = (
char *)(pt + 1);
377 memcpy(buf, _panel_descr, description_size);
392 pt->
poll = (have_function[0]) ? panel_poll :
nullptr;
400 for (; pt_iter; pt_iter = pt_iter->
prev) {
416 for (; pt_child_iter; pt_child_iter = pt_child_iter->
prev) {
443 return (menu->type && menu->type->rna_ext.srna) ? menu->type->rna_ext.srna : &RNA_Panel;
462static int rna_UIList_filter_const_FILTER_ITEM_get(
PointerRNA * )
467static int rna_UIList_item_never_show(
PointerRNA * )
475 return &ui_list->properties;
478static void rna_UIList_list_id_get(
PointerRNA *
ptr,
char *value)
481 if (!ui_list->type) {
492 if (!ui_list->type) {
499static void uilist_draw_item(
uiList *ui_list,
506 const char *active_propname,
517 func = &rna_UIList_draw_item_func;
543 func = &rna_UIList_draw_filter_func;
553static void uilist_filter_items(
uiList *ui_list,
556 const char *propname)
565 int *filter_flags, *filter_neworder;
572 func = &rna_UIList_filter_items_func;
584 printf(
"%s: Error, py func returned %d items in %s, %d or none were expected.\n",
590 filter_flags =
nullptr;
594 filter_flags = (
int *)ret1;
600 printf(
"%s: Error, py func returned %d items in %s, %d or none were expected.\n",
606 filter_neworder =
nullptr;
610 filter_neworder = (
int *)ret2;
620 if (filter_neworder) {
624 int items_shown, shown_idx;
625 int t_idx, t_ni, prev_ni;
627 for (
i = 0, shown_idx = 0;
i <
len;
i++) {
629 filter_neworder[shown_idx++] = filter_neworder[
i];
637 for (shown_idx = 0, prev_ni = -1; shown_idx < items_shown; shown_idx++) {
638 for (
i = 0, t_ni =
len, t_idx = -1;
i < items_shown;
i++) {
639 int ni = filter_neworder[
i];
640 if (ni > prev_ni && ni < t_ni) {
654 for (
i = 0;
i <
len;
i++) {
664 if (filter_neworder) {
674static bool rna_UIList_unregister(
Main *bmain,
StructRNA *type)
695 const char *identifier,
700 const char *error_prefix =
"Registering uilist class:";
702 uiList dummy_uilist = {
nullptr};
703 bool have_function[3];
706 dummy_uilist.
type = &dummy_ult;
710 if (validate(&dummy_ul_ptr,
data, have_function) != 0) {
714 if (strlen(identifier) >=
sizeof(dummy_ult.
idname)) {
717 "%s '%s' is too long, maximum length is %d",
720 int(
sizeof(dummy_ult.
idname)));
729 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
735 if (!(srna && rna_UIList_unregister(bmain, srna))) {
738 "%s '%s', bl_idname '%s' %s",
742 srna ?
"is built-in" :
"could not be unregistered");
755 memcpy(ult, &dummy_ult,
sizeof(dummy_ult));
793 func = &rna_Header_draw_func;
827 const char *identifier,
832 const char *error_prefix =
"Registering header class:";
835 Header dummy_header = {
nullptr};
836 bool have_function[1];
839 dummy_header.
type = &dummy_ht;
844 if (validate(&dummy_header_ptr,
data, have_function) != 0) {
848 if (strlen(identifier) >=
sizeof(dummy_ht.
idname)) {
851 "%s '%s' is too long, maximum length is %d",
854 int(
sizeof(dummy_ht.
idname)));
868 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
874 if (!(srna && rna_Header_unregister(bmain, srna))) {
877 "%s '%s', bl_idname '%s' %s",
881 srna ?
"is built-in" :
"could not be unregistered");
895 memcpy(ht, &dummy_ht,
sizeof(dummy_ht));
903 ht->
draw = (have_function[0]) ? header_draw :
nullptr;
931 func = &rna_Menu_poll_func;
938 visible = *(
bool *)
ret;
954 func = &rna_Menu_draw_func;
984 const char *identifier,
989 const char *error_prefix =
"Registering menu class:";
991 Menu dummy_menu = {
nullptr};
992 bool have_function[2];
993 size_t over_alloc = 0;
994 size_t description_size = 0;
998 dummy_menu.
type = &dummy_mt;
999 _menu_descr[0] =
'\0';
1007 if (validate(&dummy_menu_ptr,
data, have_function) != 0) {
1011 if (strlen(identifier) >=
sizeof(dummy_mt.
idname)) {
1014 "%s '%s' is too long, maximum length is %d",
1017 int(
sizeof(dummy_mt.
idname)));
1026 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
1032 if (!(srna && rna_Menu_unregister(bmain, srna))) {
1035 "%s '%s', bl_idname '%s' %s",
1039 srna ?
"is built-in" :
"could not be unregistered");
1051 if (_menu_descr[0]) {
1052 description_size = strlen(_menu_descr) + 1;
1053 over_alloc += description_size;
1057 memcpy(mt, &dummy_mt,
sizeof(dummy_mt));
1059 if (_menu_descr[0]) {
1060 char *buf = (
char *)(mt + 1);
1061 memcpy(buf, _menu_descr, description_size);
1076 mt->
poll = (have_function[0]) ? menu_poll :
nullptr;
1077 mt->
draw = (have_function[1]) ? menu_draw :
nullptr;
1102static bool asset_shelf_asset_poll(
const AssetShelfType *shelf_type,
1105 extern FunctionRNA rna_AssetShelf_asset_poll_func;
1109 FunctionRNA *func = &rna_AssetShelf_asset_poll_func;
1119 const bool is_visible = *(
bool *)
ret;
1142 const bool is_visible = *(
bool *)
ret;
1151 extern FunctionRNA rna_AssetShelf_get_active_asset_func;
1156 FunctionRNA *func = &rna_AssetShelf_get_active_asset_func;
1169 return active_asset;
1172static void asset_shelf_draw_context_menu(
const bContext *
C,
1177 extern FunctionRNA rna_AssetShelf_draw_context_menu_func;
1182 FunctionRNA *func = &rna_AssetShelf_draw_context_menu_func;
1195static bool rna_AssetShelf_unregister(
Main *bmain,
StructRNA *type)
1219 const char *identifier,
1224 std::unique_ptr<AssetShelfType> shelf_type = std::make_unique<AssetShelfType>();
1228 dummy_shelf.
type = shelf_type.get();
1231 bool have_function[4];
1234 if (validate(&dummy_shelf_ptr,
data, have_function) != 0) {
1238 if (strlen(identifier) >=
sizeof(shelf_type->idname)) {
1241 "Registering asset shelf class: '%s' is too long, maximum length is %d",
1243 (
int)
sizeof(shelf_type->idname));
1250 shelf_type->idname);
1251 if (existing_shelf_type && existing_shelf_type->
rna_ext.
srna) {
1254 "Registering asset shelf class: '%s' has been registered before, "
1255 "unregistering previous",
1256 shelf_type->idname);
1258 rna_AssetShelf_unregister(bmain, existing_shelf_type->
rna_ext.
srna);
1271 shelf_type->rna_ext.data =
data;
1272 shelf_type->rna_ext.call = call;
1273 shelf_type->rna_ext.free =
free;
1276 shelf_type->poll = have_function[0] ? asset_shelf_poll :
nullptr;
1277 shelf_type->asset_poll = have_function[1] ? asset_shelf_asset_poll :
nullptr;
1278 shelf_type->get_active_asset = have_function[2] ? asset_shelf_get_active_asset :
nullptr;
1279 shelf_type->draw_context_menu = have_function[3] ? asset_shelf_draw_context_menu :
nullptr;
1281 StructRNA *srna = shelf_type->rna_ext.srna;
1291static void rna_AssetShelf_activate_operator_get(
PointerRNA *
ptr,
char *value)
1297static int rna_AssetShelf_activate_operator_length(
PointerRNA *
ptr)
1303static void rna_AssetShelf_activate_operator_set(
PointerRNA *
ptr,
const char *value)
1322static void rna_AssetShelf_asset_library_set(
PointerRNA *
ptr,
int value)
1338static void rna_Panel_bl_description_set(
PointerRNA *
ptr,
const char *value)
1341 char *
str = (
char *)
data->type->description;
1346 BLI_assert_msg(0,
"setting the bl_description on a non-builtin panel");
1350static void rna_Menu_bl_description_set(
PointerRNA *
ptr,
const char *value)
1353 char *
str = (
char *)
data->type->description;
1358 BLI_assert_msg(0,
"setting the bl_description on a non-builtin menu");
1369static void rna_UILayout_active_set(
PointerRNA *
ptr,
bool value)
1379static void rna_UILayout_active_default_set(
PointerRNA *
ptr,
bool value)
1389static void rna_UILayout_activate_init_set(
PointerRNA *
ptr,
bool value)
1399static void rna_UILayout_alert_set(
PointerRNA *
ptr,
bool value)
1404static void rna_UILayout_op_context_set(
PointerRNA *
ptr,
int value)
1419static void rna_UILayout_enabled_set(
PointerRNA *
ptr,
bool value)
1430static void rna_UILayout_red_alert_set(
PointerRNA *
ptr,
bool value)
1440static void rna_UILayout_keep_aspect_set(
PointerRNA *
ptr,
int value)
1451static void rna_UILayout_alignment_set(
PointerRNA *
ptr,
int value)
1466static void rna_UILayout_scale_x_set(
PointerRNA *
ptr,
float value)
1476static void rna_UILayout_scale_y_set(
PointerRNA *
ptr,
float value)
1486static void rna_UILayout_units_x_set(
PointerRNA *
ptr,
float value)
1496static void rna_UILayout_units_y_set(
PointerRNA *
ptr,
float value)
1506static void rna_UILayout_emboss_set(
PointerRNA *
ptr,
int value)
1516static void rna_UILayout_property_split_set(
PointerRNA *
ptr,
bool value)
1521static bool rna_UILayout_property_decorate_get(
PointerRNA *
ptr)
1526static void rna_UILayout_property_decorate_set(
PointerRNA *
ptr,
bool value)
1533static bool file_handler_poll_drop(
const bContext *
C,
1536 extern FunctionRNA rna_FileHandler_poll_drop_func;
1539 nullptr, file_handler_type->
rna_ext.
srna,
nullptr);
1540 FunctionRNA *func = &rna_FileHandler_poll_drop_func;
1550 const bool is_usable = *(
bool *)
ret;
1557static bool rna_FileHandler_unregister(
Main * ,
StructRNA *type)
1563 if (!file_handler_type) {
1578 const char *identifier,
1587 dummy_file_handler.
type = &dummy_file_handler_type;
1591 nullptr, &RNA_FileHandler, &dummy_file_handler);
1593 bool have_function[1];
1596 if (validate(&dummy_file_handler_ptr,
data, have_function) != 0) {
1600 if (strlen(identifier) >=
sizeof(dummy_file_handler_type.
idname)) {
1603 "Registering file handler class: '%s' is too long, maximum length is %d",
1605 (
int)
sizeof(dummy_file_handler_type.
idname));
1611 if (registered_file_handler) {
1612 rna_FileHandler_unregister(bmain, registered_file_handler->rna_ext.srna);
1623 auto file_handler_type = std::make_unique<bke::FileHandlerType>();
1624 *file_handler_type = dummy_file_handler_type;
1633 file_handler_type->
poll_drop = have_function[0] ? file_handler_poll_drop :
nullptr;
1644 return (file_handler->type && file_handler->type->rna_ext.srna) ?
1645 file_handler->type->rna_ext.srna :
1661 {0,
nullptr, 0,
nullptr,
nullptr},
1667 {0,
nullptr, 0,
nullptr,
nullptr},
1675 "Draw standard button emboss style"},
1681 "Draw pull-down menu style"},
1686 "Draw radial menu style"},
1691 "Draw with no emboss unless the button has a coloring status like an animation state"},
1692 {0,
nullptr, 0,
nullptr,
nullptr},
1706 prop,
"rna_UILayout_active_default_get",
"rna_UILayout_active_default_set");
1710 "When true, an operator button defined after this will be activated when pressing return"
1711 "(use with popup dialogs)");
1715 prop,
"rna_UILayout_activate_init_get",
"rna_UILayout_activate_init_set");
1719 "When true, buttons defined in popups will be activated on first display "
1720 "(use so you can type into a field without having to click on it first)");
1725 prop,
"rna_UILayout_op_context_get",
"rna_UILayout_op_context_set",
nullptr);
1728 "Typically set to 'INVOKE_REGION_WIN', except some cases "
1729 "in :class:`bpy.types.Menu` when it's set to 'EXEC_REGION_WIN'.");
1741 prop,
"rna_UILayout_alignment_get",
"rna_UILayout_alignment_set",
nullptr);
1751 prop,
"rna_UILayout_keep_aspect_get",
"rna_UILayout_keep_aspect_set");
1756 prop,
"rna_UILayout_scale_x_get",
"rna_UILayout_scale_x_set",
nullptr);
1758 prop,
"Scale X",
"Scale factor along the X for items in this (sub)layout");
1762 prop,
"rna_UILayout_scale_y_get",
"rna_UILayout_scale_y_set",
nullptr);
1764 prop,
"Scale Y",
"Scale factor along the Y for items in this (sub)layout");
1768 prop,
"rna_UILayout_units_x_get",
"rna_UILayout_units_x_set",
nullptr);
1770 prop,
"Units X",
"Fixed size along the X for items in this (sub)layout");
1774 prop,
"rna_UILayout_units_y_get",
"rna_UILayout_units_y_set",
nullptr);
1776 prop,
"Units Y",
"Fixed size along the Y for items in this (sub)layout");
1785 prop,
"rna_UILayout_property_split_get",
"rna_UILayout_property_split_set");
1789 prop,
"rna_UILayout_property_decorate_get",
"rna_UILayout_property_decorate_set");
1804 "Defines if the panel has to be open or collapsed at the time of its creation"},
1809 "If set to False, the panel shows a header, which contains a clickable "
1810 "arrow to collapse the panel and the label (see bl_label)"},
1815 "Multiple panels with this type can be used as part of a list depending on data external "
1816 "to the UI. Used to create panels for the modifiers and other stacks."},
1818 "HEADER_LAYOUT_EXPAND",
1820 "Expand Header Layout",
1821 "Allow buttons in the header to stretch and shrink to fill the entire layout width"},
1822 {0,
nullptr, 0,
nullptr,
nullptr},
1836 func,
"If this method returns a non-null output, then the panel can be drawn");
1873 prop,
"rna_Panel_custom_data_get",
nullptr,
"rna_Panel_custom_data_typef",
nullptr);
1883 "If this is set, the panel gets a custom ID, otherwise it takes the "
1884 "name of the class used to define the panel. For example, if the "
1885 "class name is \"OBJECT_PT_hello\", and bl_idname is not set by the "
1886 "script, then bl_idname = \"OBJECT_PT_hello\".");
1893 "The panel label, shows up in the panel header at the right of the "
1894 "triangle used to collapse the panel");
1902 "Specific translation context, only define when the label needs to be "
1903 "disambiguated from others using the exact same label");
1920 prop,
"",
"The category (tab) in which the panel will be displayed, when applicable");
1938 prop,
"Region Type",
"The region where the panel is going to be used in");
1946 "The context in which the panel belongs to. (TODO: explain the "
1947 "possible combinations bl_context/bl_region_type/bl_space_type)");
1959 prop,
"Parent ID Name",
"If this is set, the panel becomes a sub-panel");
1972 "Panels with lower numbers are default ordered before panels with higher numbers");
2007 "If this is set, the uilist gets a custom ID, otherwise it takes the "
2008 "name of the class used to define the uilist (for example, if the "
2009 "class name is \"OBJECT_UL_vgroups\", and bl_idname is not set by the "
2010 "script, then bl_idname = \"OBJECT_UL_vgroups\")");
2018 prop,
"rna_UIList_list_id_get",
"rna_UIList_list_id_length",
nullptr);
2021 "Identifier of the list, if any was passed to the \"list_id\" "
2022 "parameter of \"template_list()\"");
2037 prop,
"Filter by Name",
"Only show items matching this name (use '*' as wildcard)");
2061 prop,
"Lock Order",
"Lock the order of shown items (user cannot change it)");
2067 "Draw an item in the list (NOTE: when you define your own draw_item "
2068 "function, you may want to check given 'item' is of the right type...)");
2072 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Layout to draw the item");
2075 func,
"data",
"AnyType",
"",
"Data from which to take Collection property");
2077 parm =
RNA_def_pointer(func,
"item",
"AnyType",
"",
"Item of the collection property");
2080 func,
"icon", 0, 0, INT_MAX,
"",
"Icon of the item in the collection", 0, INT_MAX);
2086 "Data from which to take property for the active element");
2093 "Identifier of property in active_data, for the active element");
2096 func,
"index", 0, 0, INT_MAX,
"",
"Index of the item in the collection", 0, INT_MAX);
2108 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Layout to draw the item");
2115 "Filter and/or re-order items of the collection (output filter results in "
2116 "filter_flags, and reorder results in filter_neworder arrays)");
2121 func,
"data",
"AnyType",
"",
"Data from which to take Collection property");
2124 func,
"property",
nullptr, 0,
"",
"Identifier of property in data, for the collection");
2131 "An array of filter flags, one for each item in the collection (NOTE: "
2132 "The upper 16 bits, including FILTER_ITEM, are reserved, only use the "
2133 "lower 16 bits for custom usages)");
2141 "An array of indices, one for each item in the collection, mapping the org "
2142 "index to the new one");
2152 "The value of the reserved bitflag 'FILTER_ITEM' (in filter_flags values)");
2196 "If this is set, the header gets a custom ID, otherwise it takes the "
2197 "name of the class used to define the header; for example, if the "
2198 "class name is \"OBJECT_HT_hello\", and bl_idname is not set by the "
2199 "script, then bl_idname = \"OBJECT_HT_hello\"");
2206 prop,
"Space Type",
"The space where the header is going to be used in");
2215 "The region where the header is going to be used in "
2216 "(defaults to header region)");
2230 "SEARCH_ON_KEY_PRESS",
2232 "Search on Key Press",
2233 "Open a menu search when a key pressed while the menu is open"},
2234 {0,
nullptr, 0,
nullptr,
nullptr},
2248 func,
"If this method returns a non-null output, then the menu can be drawn");
2274 "If this is set, the menu gets a custom ID, otherwise it takes the "
2275 "name of the class used to define the menu (for example, if the "
2276 "class name is \"OBJECT_MT_hello\", and bl_idname is not set by the "
2277 "script, then bl_idname = \"OBJECT_MT_hello\")");
2319 "No Asset Dragging",
2320 "Disable the default asset dragging on drag events. Useful for implementing custom "
2321 "dragging via custom key-map items."},
2325 "Visible by Default",
2326 "Unhide the asset shelf when it's available for the first time, otherwise it will be "
2329 "STORE_ENABLED_CATALOGS_IN_PREFERENCES",
2331 "Store Enabled Catalogs in Preferences",
2332 "Store the shelf's enabled catalogs in the preferences rather than the local asset shelf "
2334 {0,
nullptr, 0,
nullptr,
nullptr},
2341 srna,
"rna_AssetShelf_register",
"rna_AssetShelf_unregister",
nullptr);
2352 "If this is set, the asset gets a custom ID, otherwise it takes the "
2353 "name of the class used to define the asset (for example, if the "
2354 "class name is \"OBJECT_AST_hello\", and bl_idname is not set by the "
2355 "script, then bl_idname = \"OBJECT_AST_hello\")");
2362 prop,
"Space Type",
"The space where the asset shelf is going to be used in");
2372 "rna_AssetShelf_activate_operator_get",
2373 "rna_AssetShelf_activate_operator_length",
2374 "rna_AssetShelf_activate_operator_set");
2378 "Activate Operator",
2379 "Operator to call when activating an item with asset reference properties");
2386 prop,
"Default Preview Size",
"Default size of the asset preview thumbnails in pixels");
2393 func,
"If this method returns a non-null output, the asset shelf will be visible");
2402 "Determine if an asset should be visible in the asset shelf. If this method returns a "
2403 "non-null output, the asset will be visible.");
2412 "Return a reference to the asset that should be highlighted as active in the asset shelf");
2417 "AssetWeakReference",
2419 "The weak reference to the asset to be hightlighted as active, or None");
2424 func,
"Draw UI elements into the context menu UI layout displayed on right click");
2434 srna,
"rna_AssetShelf_asset_library_get",
"rna_AssetShelf_asset_library_set");
2436 prop,
"Asset Library",
"Choose the asset library to display assets from");
2443 "Show the asset name together with the preview. Otherwise only the "
2444 "preview will be visible.");
2468 "File Handler Type",
2469 "Extends functionality to operators that manages files, such as adding "
2470 "drag and drop support");
2473 srna,
"rna_FileHandler_register",
"rna_FileHandler_unregister",
nullptr);
2486 "If this is set, the file handler gets a custom ID, otherwise it takes the "
2487 "name of the class used to define the file handler (for example, if the "
2488 "class name is \"OBJECT_FH_hello\", and bl_idname is not set by the "
2489 "script, then bl_idname = \"OBJECT_FH_hello\")");
2497 "Operator that can handle import for files with the extensions given in bl_file_extensions");
2504 "Operator that can handle export for files with the extensions given in bl_file_extensions");
2517 "Formatted string of file extensions supported by the file handler, each extension should "
2518 "start with a \".\" and be separated by \";\"."
2519 "\nFor Example: `\".blend;.ble\"`");
2527 "If this method returns True, can be used to handle the drop of a drag-and-drop action");
bScreen * CTX_wm_screen(const bContext *C)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
@ ASSET_SHELF_TYPE_FLAG_NO_ASSET_DRAG
@ ASSET_SHELF_TYPE_FLAG_STORE_CATALOGS_IN_PREFS
@ ASSET_SHELF_TYPE_FLAG_DEFAULT_VISIBLE
#define ASSET_SHELF_PREVIEW_SIZE_DEFAULT
SpaceType * BKE_spacetype_from_id(int spaceid)
@ PANEL_TYPE_DEFAULT_CLOSED
@ PANEL_TYPE_HEADER_EXPAND
#define BLI_assert_msg(a, msg)
A dynamically sized string ADT.
void BLI_kdtree_nd_ free(KDTree *tree)
LinkData * BLI_genericNodeN(void *data)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkafter(ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * STRNCPY(char(&dst)[N], const char *src)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
@ LAYOUT_PANEL_STATE_FLAG_OPEN
#define RGN_TYPE_HAS_CATEGORY_MASK
#define PNL_CATEGORY_FALLBACK
@ UILST_FLT_ITEM_NEVER_SHOW
struct AssetRepresentationHandle AssetRepresentationHandle
Read Guarded memory(de)allocation.
static void panel_draw(const bContext *, Panel *panel)
#define RNA_DYN_DESCR_MAX
@ PARM_PYFUNC_REGISTER_OPTIONAL
@ STRUCT_NO_DATABLOCK_IDPROPERTIES
@ STRUCT_PUBLIC_NAMESPACE_INHERIT
int(*)(PointerRNA *ptr, void *data, bool *have_function) StructValidateFunc
int(*)(bContext *C, PointerRNA *ptr, FunctionRNA *func, ParameterList *list) StructCallbackFunc
void(*)(void *data) StructFreeFunc
void UI_panels_free_instanced(const bContext *C, ARegion *region)
bool UI_list_item_index_is_filtered_visible(const struct uiList *ui_list, int item_idx)
PointerRNA * UI_panel_custom_data_get(const Panel *panel)
bool uiLayoutGetActivateInit(uiLayout *layout)
void uiLayoutSetActive(uiLayout *layout, bool active)
bool uiLayoutGetPropDecorate(uiLayout *layout)
int uiLayoutGetAlignment(uiLayout *layout)
blender::ui::EmbossType uiLayoutGetEmboss(uiLayout *layout)
void uiLayoutSetUnitsY(uiLayout *layout, float unit)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
float uiLayoutGetUnitsY(uiLayout *layout)
void uiLayoutSetScaleY(uiLayout *layout, float scale)
void uiLayoutSetActiveDefault(uiLayout *layout, bool active_default)
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert)
void uiLayoutSetScaleX(uiLayout *layout, float scale)
float uiLayoutGetUnitsX(uiLayout *layout)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
bool uiLayoutGetEnabled(uiLayout *layout)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
float uiLayoutGetScaleY(uiLayout *layout)
wmOperatorCallContext uiLayoutGetOperatorContext(uiLayout *layout)
bool uiLayoutGetActive(uiLayout *layout)
bool uiLayoutGetKeepAspect(uiLayout *layout)
bool uiLayoutGetPropSep(uiLayout *layout)
void uiLayoutSetUnitsX(uiLayout *layout, float unit)
int uiLayoutGetLocalDir(const uiLayout *layout)
void uiLayoutSetKeepAspect(uiLayout *layout, bool keepaspect)
bool uiLayoutGetActiveDefault(uiLayout *layout)
float uiLayoutGetScaleX(uiLayout *layout)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiLayoutSetEmboss(uiLayout *layout, blender::ui::EmbossType emboss)
void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init)
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
bool uiLayoutGetRedAlert(uiLayout *layout)
#define ND_REGIONS_ASSET_SHELF
@ WM_OP_INVOKE_REGION_WIN
@ WM_OP_EXEC_REGION_PREVIEW
@ WM_OP_INVOKE_REGION_PREVIEW
@ WM_OP_EXEC_REGION_CHANNELS
@ WM_OP_INVOKE_REGION_CHANNELS
BMesh const char void * data
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
FileHandlerType * file_handler_find(StringRef idname)
void file_handler_add(std::unique_ptr< FileHandlerType > file_handler)
void file_handler_remove(FileHandlerType *file_handler)
AssetShelfType * type_find_from_idname(StringRef idname)
void type_unregister(const AssetShelfType &shelf_type)
void type_unlink(const Main &bmain, const AssetShelfType &shelf_type)
void type_register(std::unique_ptr< AssetShelfType > type)
int library_reference_to_enum_value(const AssetLibraryReference *library)
AssetLibraryReference library_reference_from_enum_value(int value)
void RNA_parameter_get(ParameterList *parms, PropertyRNA *parm, void **r_value)
int RNA_collection_length(PointerRNA *ptr, const char *name)
bool RNA_struct_available_or_report(ReportList *reports, const char *identifier)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
void * RNA_struct_blender_type_get(StructRNA *srna)
void RNA_parameter_list_free(ParameterList *parms)
void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, const void *value)
const char * RNA_struct_state_owner_get()
int RNA_parameter_dynamic_length_get(ParameterList *parms, PropertyRNA *parm)
ParameterList * RNA_parameter_list_create(ParameterList *parms, PointerRNA *, FunctionRNA *func)
bool RNA_struct_bl_idname_ok_or_report(ReportList *reports, const char *identifier, const char *sep)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void **r_value)
PropertyRNA * RNA_function_find_parameter(PointerRNA *, FunctionRNA *func, const char *identifier)
PropertyRNA * rna_def_asset_library_reference_common(StructRNA *srna, const char *get, const char *set)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
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_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_flag(StructRNA *srna, int flag)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_define_verify_sdna(bool verify)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg, const char *instance)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
StructRNA * RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRNA *srnafrom)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *rna_ext)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_translation_context(StructRNA *srna, const char *context)
void RNA_def_property_int_default_func(PropertyRNA *prop, const char *get_default)
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 RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_api_ui_layout(StructRNA *srna)
const EnumPropertyItem rna_enum_region_type_items[]
const EnumPropertyItem rna_enum_space_type_items[]
const EnumPropertyItem rna_enum_operator_context_items[]
static void rna_def_header(BlenderRNA *brna)
const EnumPropertyItem rna_enum_uilist_layout_type_items[]
static void rna_def_uilist(BlenderRNA *brna)
static void rna_def_asset_shelf(BlenderRNA *brna)
static void rna_def_ui_layout(BlenderRNA *brna)
static void rna_def_file_handler(BlenderRNA *brna)
static void rna_def_menu(BlenderRNA *brna)
static void rna_def_layout_panel_state(BlenderRNA *brna)
static void rna_def_panel(BlenderRNA *brna)
void RNA_def_ui(BlenderRNA *brna)
AssetLibraryReference asset_library_reference
short default_preview_size
std::string activate_operator
struct AssetShelfType * type
AssetShelfSettings settings
FileHandlerTypeHandle * type
void(* draw)(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
bool(* poll)(const bContext *C, PanelType *pt)
char translation_context[BKE_ST_MAXNAME]
void(* draw_header_preset)(const bContext *C, Panel *panel)
void(* draw_header)(const bContext *C, Panel *panel)
char idname[OP_MAX_TYPENAME]
bool(* poll_drop)(const bContext *C, FileHandlerType *file_handle_type)
int * items_filter_neworder
char idname[BKE_ST_MAXNAME]
uiListFilterItemsFunc filter_items
uiListDrawFilterFunc draw_filter
uiListDrawItemFunc draw_item
void WM_main_add_notifier(uint type, void *reference)
bool WM_paneltype_add(PanelType *pt)
void WM_paneltype_remove(PanelType *pt)
bool WM_uilisttype_add(uiListType *ult)
uiListType * WM_uilisttype_find(const StringRef idname, bool quiet)
const char * WM_uilisttype_list_id_get(const uiListType *ult, uiList *list)
void WM_uilisttype_remove_ptr(Main *bmain, uiListType *ult)