46 {0,
nullptr, 0,
nullptr,
nullptr},
53 {0,
nullptr, 0,
nullptr,
nullptr},
110 func = &rna_Panel_poll_func;
117 visible = *(
bool *)
ret;
132 func = &rna_Panel_draw_func;
141static void panel_draw_header(
const bContext *C,
Panel *panel)
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;
166 func = &rna_Panel_draw_header_preset_func;
175static void panel_type_clear_recursive(
Panel *panel,
const PanelType *type)
177 if (panel->
type == type) {
178 panel->
type =
nullptr;
182 panel_type_clear_recursive(child_panel, type);
186static bool rna_Panel_unregister(
Main *bmain,
StructRNA *type)
211 child_pt->
parent =
nullptr;
217 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase;
220 panel_type_clear_recursive(panel, pt);
241 const char *identifier,
246 const char *error_prefix =
RPT_(
"Registering panel class:");
248 PanelType *pt, *parent =
nullptr, dummy_pt = {
nullptr};
249 Panel dummy_panel = {
nullptr};
250 bool have_function[4];
251 size_t over_alloc = 0;
253 size_t description_size = 0;
256 dummy_panel.
type = &dummy_pt;
257 _panel_descr[0] =
'\0';
265 if (validate(&dummy_panel_ptr, data, have_function) != 0) {
269 if (strlen(identifier) >=
sizeof(dummy_pt.idname)) {
272 "%s '%s' is too long, maximum length is %d",
275 int(
sizeof(dummy_pt.idname)));
280 if (dummy_pt.category[0] ==
'\0') {
284 printf(
"%s '%s' misses category, please update the script\n", error_prefix, dummy_pt.idname);
289 if (dummy_pt.category[0] !=
'\0') {
293 "%s '%s' has category '%s'",
302 if (!(art = region_type_find(reports, dummy_pt.space_type, dummy_pt.region_type))) {
314 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
318 if (!rna_Panel_unregister(bmain, srna)) {
321 "%s '%s', bl_idname '%s' could not be unregistered",
332 if (dummy_pt.parent_id[0] && (parent ==
nullptr)) {
333 for (pt = pt_next; pt; pt = pt->
next) {
344 if (dummy_pt.parent_id[0] &&
STREQ(pt->
idname, dummy_pt.parent_id)) {
355 if (dummy_pt.parent_id[0] && !parent) {
358 "%s parent '%s' for '%s' not found",
366 if (_panel_descr[0]) {
367 description_size = strlen(_panel_descr) + 1;
368 over_alloc += description_size;
372 memcpy(pt, &dummy_pt,
sizeof(dummy_pt));
374 if (_panel_descr[0]) {
375 char *buf = (
char *)(pt + 1);
376 memcpy(buf, _panel_descr, description_size);
391 pt->
poll = (have_function[0]) ? panel_poll : nullptr;
393 pt->
draw_header = (have_function[2]) ? panel_draw_header : nullptr;
399 for (; pt_iter; pt_iter = pt_iter->
prev) {
415 for (; pt_child_iter; pt_child_iter = pt_child_iter->
prev) {
442 return (menu->type && menu->type->rna_ext.srna) ? menu->type->rna_ext.srna : &RNA_Panel;
461static int rna_UIList_filter_const_FILTER_ITEM_get(
PointerRNA * )
469 return &ui_list->properties;
472static void rna_UIList_list_id_get(
PointerRNA *
ptr,
char *value)
475 if (!ui_list->type) {
486 if (!ui_list->type) {
493static void uilist_draw_item(
uiList *ui_list,
500 const char *active_propname,
511 func = &rna_UIList_draw_item_func;
537 func = &rna_UIList_draw_filter_func;
547static void uilist_filter_items(
uiList *ui_list,
550 const char *propname)
559 int *filter_flags, *filter_neworder;
566 func = &rna_UIList_filter_items_func;
578 printf(
"%s: Error, py func returned %d items in %s, %d or none were expected.\n",
584 filter_flags =
nullptr;
588 filter_flags = (
int *)ret1;
594 printf(
"%s: Error, py func returned %d items in %s, %d or none were expected.\n",
600 filter_neworder =
nullptr;
604 filter_neworder = (
int *)ret2;
614 if (filter_neworder) {
618 int items_shown, shown_idx;
619 int t_idx, t_ni, prev_ni;
621 for (i = 0, shown_idx = 0; i <
len; i++) {
623 filter_neworder[shown_idx++] = filter_neworder[i];
632 for (shown_idx = 0, prev_ni = -1; shown_idx < items_shown; shown_idx++) {
633 for (i = 0, t_ni =
len, t_idx = -1; i < items_shown; i++) {
634 int ni = filter_neworder[i];
635 if (ni > prev_ni && ni < t_ni) {
649 for (i = 0; i <
len; i++) {
659 if (filter_neworder) {
670static bool rna_UIList_unregister(
Main *bmain,
StructRNA *type)
691 const char *identifier,
696 const char *error_prefix =
"Registering uilist class:";
698 uiList dummy_uilist = {
nullptr};
699 bool have_function[3];
700 size_t over_alloc = 0;
703 dummy_uilist.
type = &dummy_ult;
707 if (validate(&dummy_ul_ptr, data, have_function) != 0) {
711 if (strlen(identifier) >=
sizeof(dummy_ult.
idname)) {
714 "%s '%s' is too long, maximum length is %d",
717 int(
sizeof(dummy_ult.
idname)));
726 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
732 if (!(srna && rna_UIList_unregister(bmain, srna))) {
735 "%s '%s', bl_idname '%s' %s",
739 srna ?
"is built-in" :
"could not be unregistered");
752 memcpy(ult, &dummy_ult,
sizeof(dummy_ult));
760 ult->
draw_item = (have_function[0]) ? uilist_draw_item : nullptr;
761 ult->
draw_filter = (have_function[1]) ? uilist_draw_filter : nullptr;
762 ult->
filter_items = (have_function[2]) ? uilist_filter_items : nullptr;
789 func = &rna_Header_draw_func;
823 const char *identifier,
828 const char *error_prefix =
"Registering header class:";
831 Header dummy_header = {
nullptr};
832 bool have_function[1];
835 dummy_header.
type = &dummy_ht;
840 if (validate(&dummy_header_ptr, data, have_function) != 0) {
844 if (strlen(identifier) >=
sizeof(dummy_ht.
idname)) {
847 "%s '%s' is too long, maximum length is %d",
850 int(
sizeof(dummy_ht.
idname)));
864 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
870 if (!(srna && rna_Header_unregister(bmain, srna))) {
873 "%s '%s', bl_idname '%s' %s",
877 srna ?
"is built-in" :
"could not be unregistered");
890 ht = MEM_cnew<HeaderType>(__func__);
891 memcpy(ht, &dummy_ht,
sizeof(dummy_ht));
899 ht->
draw = (have_function[0]) ? header_draw : nullptr;
927 func = &rna_Menu_poll_func;
934 visible = *(
bool *)
ret;
949 func = &rna_Menu_draw_func;
979 const char *identifier,
984 const char *error_prefix =
"Registering menu class:";
986 Menu dummy_menu = {
nullptr};
987 bool have_function[2];
988 size_t over_alloc = 0;
989 size_t description_size = 0;
993 dummy_menu.
type = &dummy_mt;
994 _menu_descr[0] =
'\0';
1002 if (validate(&dummy_menu_ptr, data, have_function) != 0) {
1006 if (strlen(identifier) >=
sizeof(dummy_mt.
idname)) {
1009 "%s '%s' is too long, maximum length is %d",
1012 int(
sizeof(dummy_mt.
idname)));
1021 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
1027 if (!(srna && rna_Menu_unregister(bmain, srna))) {
1030 "%s '%s', bl_idname '%s' %s",
1034 srna ?
"is built-in" :
"could not be unregistered");
1046 if (_menu_descr[0]) {
1047 description_size = strlen(_menu_descr) + 1;
1048 over_alloc += description_size;
1052 memcpy(mt, &dummy_mt,
sizeof(dummy_mt));
1054 if (_menu_descr[0]) {
1055 char *buf = (
char *)(mt + 1);
1056 memcpy(buf, _menu_descr, description_size);
1071 mt->
poll = (have_function[0]) ? menu_poll : nullptr;
1072 mt->
draw = (have_function[1]) ? menu_draw : nullptr;
1097static bool asset_shelf_asset_poll(
const AssetShelfType *shelf_type,
1100 extern FunctionRNA rna_AssetShelf_asset_poll_func;
1103 FunctionRNA *func = &rna_AssetShelf_asset_poll_func;
1113 const bool is_visible = *(
bool *)
ret;
1135 const bool is_visible = *(
bool *)
ret;
1144 extern FunctionRNA rna_AssetShelf_get_active_asset_func;
1148 FunctionRNA *func = &rna_AssetShelf_get_active_asset_func;
1161 return active_asset;
1164static void asset_shelf_draw_context_menu(
const bContext *C,
1169 extern FunctionRNA rna_AssetShelf_draw_context_menu_func;
1173 FunctionRNA *func = &rna_AssetShelf_draw_context_menu_func;
1186static bool rna_AssetShelf_unregister(
Main *bmain,
StructRNA *type)
1210 const char *identifier,
1215 std::unique_ptr<AssetShelfType> shelf_type = std::make_unique<AssetShelfType>();
1219 dummy_shelf.
type = shelf_type.get();
1222 bool have_function[4];
1225 if (validate(&dummy_shelf_ptr, data, have_function) != 0) {
1229 if (strlen(identifier) >=
sizeof(shelf_type->idname)) {
1232 "Registering asset shelf class: '%s' is too long, maximum length is %d",
1234 (
int)
sizeof(shelf_type->idname));
1241 shelf_type->idname);
1242 if (existing_shelf_type && existing_shelf_type->
rna_ext.
srna) {
1245 "Registering asset shelf class: '%s' has been registered before, "
1246 "unregistering previous",
1247 shelf_type->idname);
1249 rna_AssetShelf_unregister(bmain, existing_shelf_type->
rna_ext.
srna);
1262 shelf_type->rna_ext.data =
data;
1263 shelf_type->rna_ext.call = call;
1264 shelf_type->rna_ext.free =
free;
1267 shelf_type->poll = have_function[0] ? asset_shelf_poll :
nullptr;
1268 shelf_type->asset_poll = have_function[1] ? asset_shelf_asset_poll :
nullptr;
1269 shelf_type->get_active_asset = have_function[2] ? asset_shelf_get_active_asset :
nullptr;
1270 shelf_type->draw_context_menu = have_function[3] ? asset_shelf_draw_context_menu :
nullptr;
1272 StructRNA *srna = shelf_type->rna_ext.srna;
1282static void rna_AssetShelf_activate_operator_get(
PointerRNA *
ptr,
char *value)
1288static int rna_AssetShelf_activate_operator_length(
PointerRNA *
ptr)
1294static void rna_AssetShelf_activate_operator_set(
PointerRNA *
ptr,
const char *value)
1313static void rna_AssetShelf_asset_library_set(
PointerRNA *
ptr,
int value)
1329static void rna_Panel_bl_description_set(
PointerRNA *
ptr,
const char *value)
1337 BLI_assert_msg(0,
"setting the bl_description on a non-builtin panel");
1341static void rna_Menu_bl_description_set(
PointerRNA *
ptr,
const char *value)
1349 BLI_assert_msg(0,
"setting the bl_description on a non-builtin menu");
1360static void rna_UILayout_active_set(
PointerRNA *
ptr,
bool value)
1370static void rna_UILayout_active_default_set(
PointerRNA *
ptr,
bool value)
1380static void rna_UILayout_activate_init_set(
PointerRNA *
ptr,
bool value)
1390static void rna_UILayout_alert_set(
PointerRNA *
ptr,
bool value)
1395static void rna_UILayout_op_context_set(
PointerRNA *
ptr,
int value)
1410static void rna_UILayout_enabled_set(
PointerRNA *
ptr,
bool value)
1421static void rna_UILayout_red_alert_set(
PointerRNA *
ptr,
bool value)
1431static void rna_UILayout_keep_aspect_set(
PointerRNA *
ptr,
int value)
1442static void rna_UILayout_alignment_set(
PointerRNA *
ptr,
int value)
1457static void rna_UILayout_scale_x_set(
PointerRNA *
ptr,
float value)
1467static void rna_UILayout_scale_y_set(
PointerRNA *
ptr,
float value)
1477static void rna_UILayout_units_x_set(
PointerRNA *
ptr,
float value)
1487static void rna_UILayout_units_y_set(
PointerRNA *
ptr,
float value)
1497static void rna_UILayout_emboss_set(
PointerRNA *
ptr,
int value)
1507static void rna_UILayout_property_split_set(
PointerRNA *
ptr,
bool value)
1512static bool rna_UILayout_property_decorate_get(
PointerRNA *
ptr)
1517static void rna_UILayout_property_decorate_set(
PointerRNA *
ptr,
bool value)
1524static bool file_handler_poll_drop(
const bContext *C,
1527 extern FunctionRNA rna_FileHandler_poll_drop_func;
1530 nullptr, file_handler_type->
rna_ext.
srna,
nullptr);
1531 FunctionRNA *func = &rna_FileHandler_poll_drop_func;
1541 const bool is_usable = *(
bool *)
ret;
1548static bool rna_FileHandler_unregister(
Main * ,
StructRNA *type)
1554 if (!file_handler_type) {
1561 bke::file_handler_remove(file_handler_type);
1569 const char *identifier,
1578 dummy_file_handler.
type = &dummy_file_handler_type;
1582 nullptr, &RNA_FileHandler, &dummy_file_handler);
1584 bool have_function[1];
1587 if (validate(&dummy_file_handler_ptr, data, have_function) != 0) {
1591 if (strlen(identifier) >=
sizeof(dummy_file_handler_type.idname)) {
1594 "Registering file handler class: '%s' is too long, maximum length is %d",
1596 (
int)
sizeof(dummy_file_handler_type.idname));
1601 auto registered_file_handler = bke::file_handler_find(dummy_file_handler_type.idname);
1602 if (registered_file_handler) {
1603 rna_FileHandler_unregister(bmain, registered_file_handler->rna_ext.srna);
1614 auto file_handler_type = std::make_unique<bke::FileHandlerType>();
1615 *file_handler_type = dummy_file_handler_type;
1624 file_handler_type->
poll_drop = have_function[0] ? file_handler_poll_drop :
nullptr;
1627 bke::file_handler_add(std::move(file_handler_type));
1635 return (file_handler->type && file_handler->type->rna_ext.srna) ?
1636 file_handler->type->rna_ext.srna :
1652 {0,
nullptr, 0,
nullptr,
nullptr},
1658 {0,
nullptr, 0,
nullptr,
nullptr},
1662 {
UI_EMBOSS,
"NORMAL", 0,
"Regular",
"Draw standard button emboss style"},
1664 {
UI_EMBOSS_PULLDOWN,
"PULLDOWN_MENU", 0,
"Pulldown Menu",
"Draw pulldown menu style"},
1670 "Draw with no emboss unless the button has a coloring status like an animation state"},
1671 {0,
nullptr, 0,
nullptr,
nullptr},
1685 prop,
"rna_UILayout_active_default_get",
"rna_UILayout_active_default_set");
1689 "When true, an operator button defined after this will be activated when pressing return"
1690 "(use with popup dialogs)");
1694 prop,
"rna_UILayout_activate_init_get",
"rna_UILayout_activate_init_set");
1698 "When true, buttons defined in popups will be activated on first display "
1699 "(use so you can type into a field without having to click on it first)");
1704 prop,
"rna_UILayout_op_context_get",
"rna_UILayout_op_context_set",
nullptr);
1716 prop,
"rna_UILayout_alignment_get",
"rna_UILayout_alignment_set",
nullptr);
1726 prop,
"rna_UILayout_keep_aspect_get",
"rna_UILayout_keep_aspect_set");
1731 prop,
"rna_UILayout_scale_x_get",
"rna_UILayout_scale_x_set",
nullptr);
1733 prop,
"Scale X",
"Scale factor along the X for items in this (sub)layout");
1737 prop,
"rna_UILayout_scale_y_get",
"rna_UILayout_scale_y_set",
nullptr);
1739 prop,
"Scale Y",
"Scale factor along the Y for items in this (sub)layout");
1743 prop,
"rna_UILayout_units_x_get",
"rna_UILayout_units_x_set",
nullptr);
1745 prop,
"Units X",
"Fixed size along the X for items in this (sub)layout");
1749 prop,
"rna_UILayout_units_y_get",
"rna_UILayout_units_y_set",
nullptr);
1751 prop,
"Units Y",
"Fixed size along the Y for items in this (sub)layout");
1760 prop,
"rna_UILayout_property_split_get",
"rna_UILayout_property_split_set");
1764 prop,
"rna_UILayout_property_decorate_get",
"rna_UILayout_property_decorate_set");
1779 "Defines if the panel has to be open or collapsed at the time of its creation"},
1784 "If set to False, the panel shows a header, which contains a clickable "
1785 "arrow to collapse the panel and the label (see bl_label)"},
1790 "Multiple panels with this type can be used as part of a list depending on data external "
1791 "to the UI. Used to create panels for the modifiers and other stacks."},
1793 "HEADER_LAYOUT_EXPAND",
1795 "Expand Header Layout",
1796 "Allow buttons in the header to stretch and shrink to fill the entire layout width"},
1797 {0,
nullptr, 0,
nullptr,
nullptr},
1811 func,
"If this method returns a non-null output, then the panel can be drawn");
1848 prop,
"rna_Panel_custom_data_get",
nullptr,
"rna_Panel_custom_data_typef",
nullptr);
1858 "If this is set, the panel gets a custom ID, otherwise it takes the "
1859 "name of the class used to define the panel. For example, if the "
1860 "class name is \"OBJECT_PT_hello\", and bl_idname is not set by the "
1861 "script, then bl_idname = \"OBJECT_PT_hello\".");
1868 "The panel label, shows up in the panel header at the right of the "
1869 "triangle used to collapse the panel");
1877 "Specific translation context, only define when the label needs to be "
1878 "disambiguated from others using the exact same label");
1895 prop,
"",
"The category (tab) in which the panel will be displayed, when applicable");
1913 prop,
"Region Type",
"The region where the panel is going to be used in");
1921 "The context in which the panel belongs to. (TODO: explain the "
1922 "possible combinations bl_context/bl_region_type/bl_space_type)");
1934 prop,
"Parent ID Name",
"If this is set, the panel becomes a sub-panel");
1947 "Panels with lower numbers are default ordered before panels with higher numbers");
1982 "If this is set, the uilist gets a custom ID, otherwise it takes the "
1983 "name of the class used to define the uilist (for example, if the "
1984 "class name is \"OBJECT_UL_vgroups\", and bl_idname is not set by the "
1985 "script, then bl_idname = \"OBJECT_UL_vgroups\")");
1993 prop,
"rna_UIList_list_id_get",
"rna_UIList_list_id_length",
nullptr);
1996 "Identifier of the list, if any was passed to the \"list_id\" "
1997 "parameter of \"template_list()\"");
2012 prop,
"Filter by Name",
"Only show items matching this name (use '*' as wildcard)");
2036 prop,
"Lock Order",
"Lock the order of shown items (user cannot change it)");
2042 "Draw an item in the list (NOTE: when you define your own draw_item "
2043 "function, you may want to check given 'item' is of the right type...)");
2047 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Layout to draw the item");
2050 func,
"data",
"AnyType",
"",
"Data from which to take Collection property");
2052 parm =
RNA_def_pointer(func,
"item",
"AnyType",
"",
"Item of the collection property");
2055 func,
"icon", 0, 0, INT_MAX,
"",
"Icon of the item in the collection", 0, INT_MAX);
2061 "Data from which to take property for the active element");
2068 "Identifier of property in active_data, for the active element");
2070 RNA_def_int(func,
"index", 0, 0, INT_MAX,
"",
"Index of the item in the collection", 0, INT_MAX);
2082 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Layout to draw the item");
2089 "Filter and/or re-order items of the collection (output filter results in "
2090 "filter_flags, and reorder results in filter_neworder arrays)");
2095 func,
"data",
"AnyType",
"",
"Data from which to take Collection property");
2098 func,
"property",
nullptr, 0,
"",
"Identifier of property in data, for the collection");
2105 "An array of filter flags, one for each item in the collection (NOTE: "
2106 "The upper 16 bits, including FILTER_ITEM, are reserved, only use the "
2107 "lower 16 bits for custom usages)");
2115 "An array of indices, one for each item in the collection, mapping the org "
2116 "index to the new one");
2126 "The value of the reserved bitflag 'FILTER_ITEM' (in filter_flags values)");
2165 "If this is set, the header gets a custom ID, otherwise it takes the "
2166 "name of the class used to define the header; for example, if the "
2167 "class name is \"OBJECT_HT_hello\", and bl_idname is not set by the "
2168 "script, then bl_idname = \"OBJECT_HT_hello\"");
2175 prop,
"Space Type",
"The space where the header is going to be used in");
2184 "The region where the header is going to be used in "
2185 "(defaults to header region)");
2199 "SEARCH_ON_KEY_PRESS",
2201 "Search on Key Press",
2202 "Open a menu search when a key pressed while the menu is open"},
2203 {0,
nullptr, 0,
nullptr,
nullptr},
2217 func,
"If this method returns a non-null output, then the menu can be drawn");
2243 "If this is set, the menu gets a custom ID, otherwise it takes the "
2244 "name of the class used to define the menu (for example, if the "
2245 "class name is \"OBJECT_MT_hello\", and bl_idname is not set by the "
2246 "script, then bl_idname = \"OBJECT_MT_hello\")");
2288 "No Asset Dragging",
2289 "Disable the default asset dragging on drag events. Useful for implementing custom "
2290 "dragging via custom key-map items."},
2294 "Visible by Default",
2295 "Unhide the asset shelf when it's available for the first time, otherwise it will be "
2298 "STORE_ENABLED_CATALOGS_IN_PREFERENCES",
2300 "Store Enabled Catalogs in Preferences",
2301 "Store the shelf's enabled catalogs in the preferences rather than the local asset shelf "
2303 {0,
nullptr, 0,
nullptr,
nullptr},
2310 srna,
"rna_AssetShelf_register",
"rna_AssetShelf_unregister",
nullptr);
2321 "If this is set, the asset gets a custom ID, otherwise it takes the "
2322 "name of the class used to define the asset (for example, if the "
2323 "class name is \"OBJECT_AST_hello\", and bl_idname is not set by the "
2324 "script, then bl_idname = \"OBJECT_AST_hello\")");
2331 prop,
"Space Type",
"The space where the asset shelf is going to be used in");
2341 "rna_AssetShelf_activate_operator_get",
2342 "rna_AssetShelf_activate_operator_length",
2343 "rna_AssetShelf_activate_operator_set");
2347 "Activate Operator",
2348 "Operator to call when activating an item with asset reference properties");
2355 prop,
"Default Preview Size",
"Default size of the asset preview thumbnails in pixels");
2362 func,
"If this method returns a non-null output, the asset shelf will be visible");
2371 "Determine if an asset should be visible in the asset shelf. If this method returns a "
2372 "non-null output, the asset will be visible.");
2381 "Return a reference to the asset that should be highlighted as active in the asset shelf");
2386 "AssetWeakReference",
2388 "The weak reference to the asset to be hightlighted as active, or None");
2393 func,
"Draw UI elements into the context menu UI layout displayed on right click");
2403 srna,
"rna_AssetShelf_asset_library_get",
"rna_AssetShelf_asset_library_set");
2405 prop,
"Asset Library",
"Choose the asset library to display assets from");
2412 "Show the asset name together with the preview. Otherwise only the "
2413 "preview will be visible.");
2437 "File Handler Type",
2438 "Extends functionality to operators that manages files, such as adding "
2439 "drag and drop support");
2442 srna,
"rna_FileHandler_register",
"rna_FileHandler_unregister",
nullptr);
2455 "If this is set, the file handler gets a custom ID, otherwise it takes the "
2456 "name of the class used to define the file handler (for example, if the "
2457 "class name is \"OBJECT_FH_hello\", and bl_idname is not set by the "
2458 "script, then bl_idname = \"OBJECT_FH_hello\")");
2466 "Operator that can handle import for files with the extensions given in bl_file_extensions");
2473 "Operator that can handle export for files with the extensions given in bl_file_extensions");
2486 "Formatted string of file extensions supported by the file handler, each extension should "
2487 "start with a \".\" and be separated by \";\"."
2488 "\nFor Example: `\".blend;.ble\"`");
2496 "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)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
struct LinkData * BLI_genericNodeN(void *data)
#define STRNCPY(dst, 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
struct AssetRepresentationHandle AssetRepresentationHandle
Read Guarded memory(de)allocation.
static void panel_draw(const bContext *, Panel *panel)
#define RNA_DYN_DESCR_MAX
@ STRUCT_NO_DATABLOCK_IDPROPERTIES
@ STRUCT_PUBLIC_NAMESPACE_INHERIT
int(*)(PointerRNA *ptr, void *data, bool *have_function) StructValidateFunc
void(*)(void *data) StructFreeFunc
int(*)(bContext *C, PointerRNA *ptr, FunctionRNA *func, ParameterList *list) StructCallbackFunc
bool uiLayoutGetActivateInit(uiLayout *layout)
void uiLayoutSetActive(uiLayout *layout, bool active)
bool uiLayoutGetPropDecorate(uiLayout *layout)
int uiLayoutGetAlignment(uiLayout *layout)
void uiLayoutSetUnitsY(uiLayout *layout, float unit)
@ UI_EMBOSS_NONE_OR_STATUS
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 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)
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)
eUIEmbossType uiLayoutGetEmboss(uiLayout *layout)
int uiLayoutGetLocalDir(const uiLayout *layout)
void uiLayoutSetKeepAspect(uiLayout *layout, bool keepaspect)
bool uiLayoutGetActiveDefault(uiLayout *layout)
void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss)
float uiLayoutGetScaleX(uiLayout *layout)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init)
PointerRNA * UI_panel_custom_data_get(const Panel *panel)
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
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void *(* MEM_mallocN)(size_t len, const char *str)
void *(* MEM_callocN)(size_t len, const char *str)
AssetShelfType * type_find_from_idname(const 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)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
bool RNA_struct_bl_idname_ok_or_report(ReportList *reports, const char *identifier, const char *sep)
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)
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_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
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)
uiListType * WM_uilisttype_find(const char *idname, bool quiet)
bool WM_uilisttype_add(uiListType *ult)
const char * WM_uilisttype_list_id_get(const uiListType *ult, uiList *list)
void WM_uilisttype_remove_ptr(Main *bmain, uiListType *ult)