37 {int(wmOpCallContext::InvokeDefault),
"INVOKE_DEFAULT", 0,
"Invoke Default",
""},
38 {int(wmOpCallContext::InvokeRegionWin),
"INVOKE_REGION_WIN", 0,
"Invoke Region Window",
""},
39 {int(wmOpCallContext::InvokeRegionChannels),
"INVOKE_REGION_CHANNELS", 0,
"Invoke Region Channels",
""},
40 {int(wmOpCallContext::InvokeRegionPreview),
"INVOKE_REGION_PREVIEW", 0,
"Invoke Region Preview",
""},
41 {int(wmOpCallContext::InvokeArea),
"INVOKE_AREA", 0,
"Invoke Area",
""},
42 {int(wmOpCallContext::InvokeScreen),
"INVOKE_SCREEN", 0,
"Invoke Screen",
""},
43 {int(wmOpCallContext::ExecDefault),
"EXEC_DEFAULT", 0,
"Exec Default",
""},
44 {int(wmOpCallContext::ExecRegionWin),
"EXEC_REGION_WIN", 0,
"Exec Region Window",
""},
45 {int(wmOpCallContext::ExecRegionChannels),
"EXEC_REGION_CHANNELS", 0,
"Exec Region Channels",
""},
46 {int(wmOpCallContext::ExecRegionPreview),
"EXEC_REGION_PREVIEW", 0,
"Exec Region Preview",
""},
47 {int(wmOpCallContext::ExecArea),
"EXEC_AREA", 0,
"Exec Area",
""},
48 {int(wmOpCallContext::ExecScreen),
"EXEC_SCREEN", 0,
"Exec Screen",
""},
49 {0,
nullptr, 0,
nullptr,
nullptr},
56 {0,
nullptr, 0,
nullptr,
nullptr},
95 for (art = (st) ? st->regiontypes.first() :
nullptr; art; art = art->next) {
96 if (art->regionid == region_type) {
102 if (art ==
nullptr) {
122 func = rna_Panel_poll_func;
126 pt->rna_ext.call(
const_cast<bContext *
>(
C), &ptr, func, &
list);
129 visible = *
static_cast<bool *
>(
ret);
145 func = rna_Panel_draw_func;
149 panel->type->rna_ext.call(
const_cast<bContext *
>(
C), &ptr, func, &
list);
163 func = rna_Panel_draw_header_func;
167 panel->type->rna_ext.call(
const_cast<bContext *
>(
C), &ptr, func, &
list);
172static void panel_draw_header_preset(
const bContext *
C,
Panel *panel)
174 extern FunctionRNA *rna_Panel_draw_header_preset_func;
181 func = rna_Panel_draw_header_preset_func;
185 panel->type->rna_ext.call(
const_cast<bContext *
>(
C), &ptr, func, &
list);
190static void panel_type_clear_recursive(
Panel *panel,
const PanelType *type)
192 if (panel->type == type) {
193 panel->type =
nullptr;
197 panel_type_clear_recursive(&child_panel, type);
201static bool rna_Panel_unregister(
Main *bmain,
StructRNA *type)
209 if (!(art = region_type_find(
nullptr, pt->space_type, pt->region_type))) {
225 for (
LinkData &link : pt->children) {
227 child_pt->
parent =
nullptr;
230 for (
bScreen &screen : bmain->screens) {
231 for (
ScrArea &area : screen.areabase) {
233 ListBaseT<ARegion> *regionbase = (&sl == area.spacedata.first()) ? &area.regionbase :
235 for (
ARegion ®ion : *regionbase) {
236 for (
Panel &panel : region.panels) {
237 panel_type_clear_recursive(&panel, pt);
247 pt->children.free_no_destruct();
258 const char *identifier,
263 const char *error_prefix =
RPT_(
"Registering panel class:");
265 PanelType *pt, *parent =
nullptr, dummy_pt = {
nullptr};
266 Panel dummy_panel = {
nullptr};
267 bool have_function[4];
268 size_t over_alloc = 0;
270 size_t description_size = 0;
273 dummy_panel.
type = &dummy_pt;
274 _panel_descr[0] =
'\0';
282 if (validate(&dummy_panel_ptr,
data, have_function) != 0) {
286 if (strlen(identifier) >=
sizeof(dummy_pt.idname)) {
289 "%s '%s' is too long, maximum length is %d",
292 int(
sizeof(dummy_pt.idname)));
296 if (!(art = region_type_find(reports, dummy_pt.space_type, dummy_pt.region_type))) {
301 if (dummy_pt.category[0] ==
'\0') {
305 printf(
"%s '%s' misses category, please update the script\n", error_prefix, dummy_pt.idname);
310 if (dummy_pt.category[0] !=
'\0') {
314 "%s '%s' has category '%s'",
324 for (pt = art->paneltypes.first(); pt; pt = pt->next) {
325 if (
STREQ(pt->idname, dummy_pt.idname)) {
331 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
335 if (!rna_Panel_unregister(bmain, srna)) {
338 "%s '%s', bl_idname '%s' could not be unregistered",
349 if (dummy_pt.parent_id[0] && (parent ==
nullptr)) {
350 for (pt = pt_next; pt; pt = pt->next) {
351 if (
STREQ(pt->idname, dummy_pt.parent_id)) {
361 if (dummy_pt.parent_id[0] &&
STREQ(pt->idname, dummy_pt.parent_id)) {
372 if (dummy_pt.parent_id[0] && !parent) {
375 "%s parent '%s' for '%s' not found",
383 if (_panel_descr[0]) {
384 description_size = strlen(_panel_descr) + 1;
385 over_alloc += description_size;
389 memcpy(pt, &dummy_pt,
sizeof(dummy_pt));
391 if (_panel_descr[0]) {
392 char *buf =
reinterpret_cast<char *
>(pt + 1);
393 memcpy(buf, _panel_descr, description_size);
394 pt->description = buf;
397 pt->description =
nullptr;
402 pt->rna_ext.data =
data;
403 pt->rna_ext.call = call;
404 pt->rna_ext.free =
free;
408 pt->poll = (have_function[0]) ? panel_poll :
nullptr;
409 pt->draw = (have_function[1]) ? panel_draw :
nullptr;
410 pt->draw_header = (have_function[2]) ? panel_draw_header :
nullptr;
411 pt->draw_header_preset = (have_function[3]) ? panel_draw_header_preset :
nullptr;
414 PanelType *pt_iter = art->paneltypes.last();
416 for (; pt_iter; pt_iter = pt_iter->prev) {
421 if (pt_iter->order <= pt->order) {
431 LinkData *pt_child_iter = parent->children.last();
432 for (; pt_child_iter; pt_child_iter = pt_child_iter->prev) {
434 if (pt_child->order <= pt->order) {
444 STRNCPY(pt->owner_id, owner_id);
453 return pt->rna_ext.srna;
458 Panel *panel =
static_cast<Panel *
>(ptr->data);
459 return (panel->type && panel->type->rna_ext.srna) ? panel->
type->
rna_ext.
srna : RNA_Panel;
464 Panel *panel =
static_cast<Panel *
>(ptr->data);
471 Panel *panel =
static_cast<Panel *
>(ptr->data);
478static int rna_UIList_filter_const_FILTER_ITEM_get(
PointerRNA * )
483static int rna_UIList_item_never_show(
PointerRNA * )
494static void rna_UIList_list_id_get(
PointerRNA *ptr,
char *value)
497 if (!ui_list->type) {
505static int rna_UIList_list_id_length(
PointerRNA *ptr)
508 if (!ui_list->type) {
515static void uilist_draw_item(
uiList *ui_list,
522 const char *active_propname,
533 func = rna_UIList_draw_item_func;
537 Layout *layout_ptr = &layout;
546 ui_list->type->rna_ext.call(
const_cast<bContext *
>(
C), &ul_ptr, func, &
list);
551static void uilist_draw_filter(
uiList *ui_list,
const bContext *
C, Layout &layout)
560 func = rna_UIList_draw_filter_func;
564 Layout *layout_ptr = &layout;
566 ui_list->type->rna_ext.call(
const_cast<bContext *
>(
C), &ul_ptr, func, &
list);
571static void uilist_filter_items(
uiList *ui_list,
574 const char *propname)
583 int *filter_flags, *filter_neworder;
590 func = rna_UIList_filter_items_func;
597 ui_list->type->rna_ext.call(
const_cast<bContext *
>(
C), &ul_ptr, func, &
list);
602 printf(
"%s: Error, py func returned %d items in %s, %d or none were expected.\n",
608 filter_flags =
nullptr;
612 filter_flags =
static_cast<int *
>(ret1);
618 printf(
"%s: Error, py func returned %d items in %s, %d or none were expected.\n",
624 filter_neworder =
nullptr;
628 filter_neworder =
static_cast<int *
>(ret2);
636 memcpy(flt_data->items_filter_flags, filter_flags,
sizeof(
int) *
len);
638 if (filter_neworder) {
642 int items_shown, shown_idx;
643 int t_idx, t_ni, prev_ni;
644 flt_data->items_shown = 0;
645 for (i = 0, shown_idx = 0; i <
len; i++) {
647 filter_neworder[shown_idx++] = filter_neworder[i];
650 items_shown = flt_data->items_shown = shown_idx;
656 for (shown_idx = 0, prev_ni = -1; shown_idx < items_shown; shown_idx++) {
657 for (i = 0, t_ni =
len, t_idx = -1; i < items_shown; i++) {
658 int ni = filter_neworder[i];
659 if (ni > prev_ni && ni < t_ni) {
666 flt_data->items_filter_neworder[t_idx] = shown_idx;
672 flt_data->items_shown = 0;
673 for (i = 0; i <
len; i++) {
675 flt_data->items_shown++;
681 flt_data->items_shown =
len;
683 if (filter_neworder) {
685 memcpy(flt_data->items_filter_neworder, filter_neworder,
sizeof(
int) *
len);
693static bool rna_UIList_unregister(
Main *bmain,
StructRNA *type)
714 const char *identifier,
719 const char *error_prefix =
"Registering uilist class:";
721 uiList dummy_uilist = {
nullptr};
722 bool have_function[3];
725 dummy_uilist.
type = &dummy_ult;
729 if (validate(&dummy_ul_ptr,
data, have_function) != 0) {
733 if (strlen(identifier) >=
sizeof(dummy_ult.idname)) {
736 "%s '%s' is too long, maximum length is %d",
739 int(
sizeof(dummy_ult.idname)));
748 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
754 if (!(srna && rna_UIList_unregister(bmain, srna))) {
757 "%s '%s', bl_idname '%s' %s",
761 srna ?
"is built-in" :
"could not be unregistered");
774 memcpy(ult, &dummy_ult,
sizeof(dummy_ult));
777 ult->rna_ext.data =
data;
778 ult->rna_ext.call = call;
779 ult->rna_ext.free =
free;
782 ult->draw_item = (have_function[0]) ? uilist_draw_item :
nullptr;
783 ult->draw_filter = (have_function[1]) ? uilist_draw_filter :
nullptr;
784 ult->filter_items = (have_function[2]) ? uilist_filter_items :
nullptr;
791 return ult->rna_ext.srna;
797 return (ui_list->type && ui_list->type->rna_ext.srna) ? ui_list->
type->
rna_ext.
srna : RNA_UIList;
811 func = rna_Header_draw_func;
815 hdr->type->rna_ext.call(
const_cast<bContext *
>(
C), &htr, func, &
list);
820static bool rna_Header_unregister(
Main *bmain,
StructRNA *type)
829 if (!(art = region_type_find(
nullptr, ht->space_type, ht->region_type))) {
847 const char *identifier,
852 const char *error_prefix =
"Registering header class:";
855 Header dummy_header = {
nullptr};
856 bool have_function[1];
859 dummy_header.
type = &dummy_ht;
864 if (validate(&dummy_header_ptr,
data, have_function) != 0) {
868 if (strlen(identifier) >=
sizeof(dummy_ht.idname)) {
871 "%s '%s' is too long, maximum length is %d",
874 int(
sizeof(dummy_ht.idname)));
878 if (!(art = region_type_find(reports, dummy_ht.space_type, dummy_ht.region_type))) {
888 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
894 if (!(srna && rna_Header_unregister(bmain, srna))) {
897 "%s '%s', bl_idname '%s' %s",
901 srna ?
"is built-in" :
"could not be unregistered");
915 memcpy(ht, &dummy_ht,
sizeof(dummy_ht));
918 ht->rna_ext.data =
data;
919 ht->rna_ext.call = call;
920 ht->rna_ext.free =
free;
923 ht->draw = (have_function[0]) ? header_draw :
nullptr;
930 return ht->rna_ext.srna;
936 return (hdr->type && hdr->type->rna_ext.srna) ? hdr->
type->
rna_ext.
srna : RNA_Header;
951 func = rna_Menu_poll_func;
955 pt->rna_ext.call(
const_cast<bContext *
>(
C), &ptr, func, &
list);
958 visible = *
static_cast<bool *
>(
ret);
974 func = rna_Menu_draw_func;
978 menu->type->rna_ext.call(
const_cast<bContext *
>(
C), &mtr, func, &
list);
1005 const char *identifier,
1010 const char *error_prefix =
"Registering menu class:";
1011 MenuType *mt, dummy_mt = {
nullptr};
1012 Menu dummy_menu = {
nullptr};
1013 bool have_function[2];
1014 size_t over_alloc = 0;
1015 size_t description_size = 0;
1019 dummy_menu.
type = &dummy_mt;
1020 _menu_descr[0] =
'\0';
1028 if (validate(&dummy_menu_ptr,
data, have_function) != 0) {
1032 if (strlen(identifier) >=
sizeof(dummy_mt.idname)) {
1035 "%s '%s' is too long, maximum length is %d",
1038 int(
sizeof(dummy_mt.idname)));
1047 "%s '%s', bl_idname '%s' has been registered before, unregistering previous",
1053 if (!(srna && rna_Menu_unregister(bmain, srna))) {
1056 "%s '%s', bl_idname '%s' %s",
1060 srna ?
"is built-in" :
"could not be unregistered");
1072 if (_menu_descr[0]) {
1073 description_size = strlen(_menu_descr) + 1;
1074 over_alloc += description_size;
1079 memcpy(mt, &dummy_mt,
sizeof(dummy_mt));
1081 if (_menu_descr[0]) {
1082 char *buf =
reinterpret_cast<char *
>(mt + 1);
1083 memcpy(buf, _menu_descr, description_size);
1084 mt->description = buf;
1087 mt->description =
nullptr;
1092 mt->rna_ext.data =
data;
1093 mt->rna_ext.call = call;
1094 mt->rna_ext.free =
free;
1098 mt->poll = (have_function[0]) ? menu_poll :
nullptr;
1099 mt->draw = (have_function[1]) ? menu_draw :
nullptr;
1104 STRNCPY(mt->owner_id, owner_id);
1113 return mt->rna_ext.srna;
1118 Menu *menu =
static_cast<Menu *
>(mtr->data);
1119 return (menu->type && menu->type->rna_ext.srna) ? menu->
type->
rna_ext.
srna : RNA_Menu;
1124static bool asset_shelf_asset_poll(
const AssetShelfType *shelf_type,
1127 extern FunctionRNA *rna_AssetShelf_asset_poll_func;
1130 nullptr, shelf_type->rna_ext.srna,
nullptr);
1131 FunctionRNA *func = rna_AssetShelf_asset_poll_func;
1136 shelf_type->rna_ext.call(
nullptr, &ptr, func, &
list);
1141 const bool is_visible = *
static_cast<bool *
>(
ret);
1153 nullptr, shelf_type->rna_ext.srna,
nullptr);
1159 shelf_type->rna_ext.call(
const_cast<bContext *
>(
C), &ptr, func, &
list);
1164 const bool is_visible = *
static_cast<bool *
>(
ret);
1173 extern FunctionRNA *rna_AssetShelf_get_active_asset_func;
1176 nullptr, shelf_type->rna_ext.srna,
nullptr);
1178 FunctionRNA *func = rna_AssetShelf_get_active_asset_func;
1182 shelf_type->rna_ext.call(
nullptr, &ptr, func, &
list);
1191 return active_asset;
1194static void asset_shelf_draw_context_menu(
const bContext *
C,
1199 extern FunctionRNA *rna_AssetShelf_draw_context_menu_func;
1202 nullptr, shelf_type->rna_ext.srna,
nullptr);
1204 FunctionRNA *func = rna_AssetShelf_draw_context_menu_func;
1211 Layout *layout_ptr = &layout;
1213 shelf_type->rna_ext.call(
const_cast<bContext *
>(
C), &ptr, func, &
list);
1218static bool rna_AssetShelf_unregister(
Main *bmain,
StructRNA *type)
1243 const char *identifier,
1248 std::unique_ptr<AssetShelfType> shelf_type = std::make_unique<AssetShelfType>();
1252 dummy_shelf.
type = shelf_type.get();
1255 bool have_function[4];
1258 if (validate(&dummy_shelf_ptr,
data, have_function) != 0) {
1262 if (strlen(identifier) >=
sizeof(shelf_type->idname)) {
1265 "Registering asset shelf class: '%s' is too long, maximum length is %d",
1267 int(
sizeof(shelf_type->idname)));
1274 shelf_type->idname);
1275 if (existing_shelf_type && existing_shelf_type->rna_ext.srna) {
1278 "Registering asset shelf class: '%s' has been registered before, "
1279 "unregistering previous",
1280 shelf_type->idname);
1282 rna_AssetShelf_unregister(bmain, existing_shelf_type->rna_ext.srna);
1296 shelf_type->rna_ext.data =
data;
1297 shelf_type->rna_ext.call = call;
1298 shelf_type->rna_ext.free =
free;
1301 shelf_type->poll = have_function[0] ? asset_shelf_poll :
nullptr;
1302 shelf_type->asset_poll = have_function[1] ? asset_shelf_asset_poll :
nullptr;
1303 shelf_type->get_active_asset = have_function[2] ? asset_shelf_get_active_asset :
nullptr;
1304 shelf_type->draw_context_menu = have_function[3] ? asset_shelf_draw_context_menu :
nullptr;
1306 StructRNA *srna = shelf_type->rna_ext.srna;
1316static void rna_AssetShelf_activate_operator_get(
PointerRNA *ptr,
char *value)
1319 strcpy(value,
shelf->type->activate_operator.c_str());
1322static int rna_AssetShelf_activate_operator_length(
PointerRNA *ptr)
1325 return shelf->type->activate_operator.size();
1328static void rna_AssetShelf_activate_operator_set(
PointerRNA *ptr,
const char *value)
1331 shelf->type->activate_operator = value;
1334static void rna_AssetShelf_drag_operator_get(
PointerRNA *ptr,
char *value)
1337 strcpy(value,
shelf->type->drag_operator.c_str());
1340static int rna_AssetShelf_drag_operator_length(
PointerRNA *ptr)
1343 return shelf->type->drag_operator.size();
1346static void rna_AssetShelf_drag_operator_set(
PointerRNA *ptr,
const char *value)
1349 shelf->type->drag_operator = value;
1355 return (
shelf->type &&
shelf->type->rna_ext.srna) ?
shelf->type->rna_ext.srna : RNA_AssetShelf;
1358static int rna_AssetShelf_asset_library_get(
PointerRNA *ptr)
1364static void rna_AssetShelf_asset_library_set(
PointerRNA *ptr,
int value)
1373 if (
shelf->type &&
shelf->type->default_preview_size) {
1374 return shelf->type->default_preview_size;
1379static void rna_Panel_bl_description_set(
PointerRNA *ptr,
const char *value)
1382 char *
str =
const_cast<char *
>(
data->type->description);
1387 BLI_assert_msg(0,
"setting the bl_description on a non-builtin panel");
1391static void rna_Menu_bl_description_set(
PointerRNA *ptr,
const char *value)
1394 char *
str =
const_cast<char *
>(
data->type->description);
1399 BLI_assert_msg(0,
"setting the bl_description on a non-builtin menu");
1405static bool rna_UILayout_active_get(
PointerRNA *ptr)
1407 return ptr->data_as<
const Layout>()->active();
1410static void rna_UILayout_active_set(
PointerRNA *ptr,
bool value)
1412 ptr->data_as<
Layout>()->active_set(value);
1415static bool rna_UILayout_active_default_get(
PointerRNA *ptr)
1417 return ptr->data_as<
const Layout>()->active_default();
1420static void rna_UILayout_active_default_set(
PointerRNA *ptr,
bool value)
1422 ptr->data_as<
Layout>()->active_default_set(value);
1425static bool rna_UILayout_activate_init_get(
PointerRNA *ptr)
1427 return ptr->data_as<
const Layout>()->activate_init();
1430static void rna_UILayout_activate_init_set(
PointerRNA *ptr,
bool value)
1432 ptr->data_as<
Layout>()->activate_init_set(value);
1435static bool rna_UILayout_alert_get(
PointerRNA *ptr)
1437 return ptr->data_as<
const Layout>()->red_alert();
1440static void rna_UILayout_alert_set(
PointerRNA *ptr,
bool value)
1442 ptr->data_as<
Layout>()->red_alert_set(value);
1445static void rna_UILayout_op_context_set(
PointerRNA *ptr,
int value)
1450static int rna_UILayout_op_context_get(
PointerRNA *ptr)
1452 return int(ptr->data_as<
const Layout>()->operator_context());
1455static bool rna_UILayout_enabled_get(
PointerRNA *ptr)
1457 return ptr->data_as<
const Layout>()->enabled();
1460static void rna_UILayout_enabled_set(
PointerRNA *ptr,
bool value)
1462 ptr->data_as<
Layout>()->enabled_set(value);
1466static int rna_UILayout_red_alert_get(
PointerRNA *ptr)
1468 return ptr->data_as<
const Layout>()->red_alert();
1471static void rna_UILayout_red_alert_set(
PointerRNA *ptr,
bool value)
1473 ptr->data_as<
Layout>()->red_alert_set(value);
1477static int rna_UILayout_alignment_get(
PointerRNA *ptr)
1479 return int(ptr->data_as<
const Layout>()->alignment());
1482static void rna_UILayout_alignment_set(
PointerRNA *ptr,
int value)
1487static int rna_UILayout_direction_get(
PointerRNA *ptr)
1489 return int(ptr->data_as<
const Layout>()->local_direction());
1492static float rna_UILayout_scale_x_get(
PointerRNA *ptr)
1494 return ptr->data_as<
const Layout>()->scale_x();
1497static void rna_UILayout_scale_x_set(
PointerRNA *ptr,
float value)
1499 ptr->data_as<
Layout>()->scale_x_set(value);
1502static float rna_UILayout_scale_y_get(
PointerRNA *ptr)
1504 return ptr->data_as<
const Layout>()->scale_y();
1507static void rna_UILayout_scale_y_set(
PointerRNA *ptr,
float value)
1509 ptr->data_as<
Layout>()->scale_y_set(value);
1512static float rna_UILayout_units_x_get(
PointerRNA *ptr)
1514 return ptr->data_as<
const Layout>()->ui_units_x();
1517static void rna_UILayout_units_x_set(
PointerRNA *ptr,
float value)
1519 ptr->data_as<
Layout>()->ui_units_x_set(value);
1522static float rna_UILayout_units_y_get(
PointerRNA *ptr)
1524 return ptr->data_as<
const Layout>()->ui_units_y();
1527static float rna_UIlayout_property_split_factor_get(
PointerRNA * )
1529 return Layout::PROPERTY_SPLIT_FACTOR;
1532static void rna_UILayout_units_y_set(
PointerRNA *ptr,
float value)
1534 ptr->data_as<
Layout>()->ui_units_y_set(value);
1537static int rna_UILayout_emboss_get(
PointerRNA *ptr)
1539 return int(ptr->data_as<
const Layout>()->emboss());
1542static void rna_UILayout_emboss_set(
PointerRNA *ptr,
int value)
1547static bool rna_UILayout_property_split_get(
PointerRNA *ptr)
1549 return ptr->data_as<
const Layout>()->use_property_split();
1552static void rna_UILayout_property_split_set(
PointerRNA *ptr,
bool value)
1554 ptr->data_as<
Layout>()->use_property_split_set(value);
1557static bool rna_UILayout_property_decorate_get(
PointerRNA *ptr)
1559 return ptr->data_as<
const Layout>()->use_property_decorate();
1562static void rna_UILayout_property_decorate_set(
PointerRNA *ptr,
bool value)
1564 ptr->data_as<
Layout>()->use_property_decorate_set(value);
1571 extern FunctionRNA *rna_FileHandler_poll_drop_func;
1574 nullptr, file_handler_type->rna_ext.srna,
nullptr);
1575 FunctionRNA *func = rna_FileHandler_poll_drop_func;
1580 file_handler_type->rna_ext.call(
const_cast<bContext *
>(
C), &ptr, func, &
list);
1585 const bool is_usable = *
static_cast<bool *
>(
ret);
1592static bool rna_FileHandler_unregister(
Main * ,
StructRNA *type)
1597 if (!file_handler_type) {
1612 const char *identifier,
1620 dummy_file_handler.
type = &dummy_file_handler_type;
1624 nullptr, RNA_FileHandler, &dummy_file_handler);
1626 bool have_function[1];
1629 if (validate(&dummy_file_handler_ptr,
data, have_function) != 0) {
1633 if (strlen(identifier) >=
sizeof(dummy_file_handler_type.idname)) {
1636 "Registering file handler class: '%s' is too long, maximum length is %d",
1638 int(
sizeof(dummy_file_handler_type.idname)));
1644 if (registered_file_handler) {
1645 rna_FileHandler_unregister(bmain, registered_file_handler->rna_ext.srna);
1656 auto file_handler_type = std::make_unique<bke::FileHandlerType>();
1657 *file_handler_type = dummy_file_handler_type;
1661 file_handler_type->rna_ext.data =
data;
1662 file_handler_type->rna_ext.call = call;
1663 file_handler_type->rna_ext.free =
free;
1666 file_handler_type->poll_drop = have_function[0] ? file_handler_poll_drop :
nullptr;
1668 auto srna = file_handler_type->rna_ext.srna;
1677 return (file_handler->type && file_handler->type->rna_ext.srna) ?
1682static void rna_FileHandler_label_with_extensions(
const char *idname,
char *
result)
1686 file_handler ? file_handler->label_with_extensions().c_str() :
"",
1706 {0,
nullptr, 0,
nullptr,
nullptr},
1712 {0,
nullptr, 0,
nullptr,
nullptr},
1722 "Draw pull-down menu style"},
1728 "Draw with no emboss unless the button has a coloring status like an animation state"},
1729 {0,
nullptr, 0,
nullptr,
nullptr},
1742 "When false, all items within this layout are grayed out. Values can "
1743 "still be changed and interactions are allowed");
1747 prop,
"rna_UILayout_active_default_get",
"rna_UILayout_active_default_set");
1751 "When true, an operator button defined after this will be activated when pressing return"
1752 "(use with popup dialogs)");
1756 prop,
"rna_UILayout_activate_init_get",
"rna_UILayout_activate_init_set");
1760 "When true, buttons defined in popups will be activated on first display "
1761 "(use so you can type into a field without having to click on it first)");
1766 prop,
"rna_UILayout_op_context_get",
"rna_UILayout_op_context_set",
nullptr);
1769 "Typically set to 'INVOKE_REGION_WIN', except some cases "
1770 "in :class:`bpy.types.Menu` when it's set to 'EXEC_REGION_WIN'.");
1776 "When false, all items within this layout are grayed out. Values "
1777 "cannot be changed and interactions are disabled");
1785 prop,
"rna_UILayout_alignment_get",
"rna_UILayout_alignment_set",
nullptr);
1794 prop,
"rna_UILayout_scale_x_get",
"rna_UILayout_scale_x_set",
nullptr);
1796 prop,
"Scale X",
"Scale factor along the X for items in this (sub)layout");
1800 prop,
"rna_UILayout_scale_y_get",
"rna_UILayout_scale_y_set",
nullptr);
1802 prop,
"Scale Y",
"Scale factor along the Y for items in this (sub)layout");
1806 prop,
"rna_UILayout_units_x_get",
"rna_UILayout_units_x_set",
nullptr);
1808 prop,
"Units X",
"Fixed size along the X for items in this (sub)layout");
1812 prop,
"rna_UILayout_units_y_get",
"rna_UILayout_units_y_set",
nullptr);
1814 prop,
"Units Y",
"Fixed size along the Y for items in this (sub)layout");
1823 prop,
"rna_UILayout_property_split_get",
"rna_UILayout_property_split_set");
1826 "property_split_factor",
1830 "Property Split Factor",
1831 "Factor used by the layout system when property split is enabled",
1839 prop,
"rna_UILayout_property_decorate_get",
"rna_UILayout_property_decorate_set");
1854 "Defines if the panel has to be open or collapsed at the time of its creation"},
1859 "If set to False, the panel shows a header, which contains a clickable "
1860 "arrow to collapse the panel and the label (see bl_label)"},
1865 "Multiple panels with this type can be used as part of a list depending on data external "
1866 "to the UI. Used to create panels for the modifiers and other stacks."},
1868 "HEADER_LAYOUT_EXPAND",
1870 "Expand Header Layout",
1871 "Allow buttons in the header to stretch and shrink to fill the entire layout width"},
1872 {0,
nullptr, 0,
nullptr,
nullptr},
1886 func,
"If this method returns a non-null output, then the panel can be drawn");
1923 prop,
"rna_Panel_custom_data_get",
nullptr,
"rna_Panel_custom_data_typef",
nullptr);
1933 "If this is set, the panel gets a custom ID, otherwise it takes the "
1934 "name of the class used to define the panel. For example, if the "
1935 "class name is \"OBJECT_PT_hello\", and bl_idname is not set by the "
1936 "script, then bl_idname = \"OBJECT_PT_hello\".");
1943 "The panel label, shows up in the panel header at the right of the "
1944 "triangle used to collapse the panel");
1952 "Specific translation context, only define when the label needs to be "
1953 "disambiguated from others using the exact same label");
1970 prop,
"",
"The category (tab) in which the panel will be displayed, when applicable");
1999 prop,
"Region Type",
"The region where the panel is going to be used in");
2007 "The context in which the panel belongs to. (TODO: explain the "
2008 "possible combinations bl_context/bl_region_type/bl_space_type)");
2020 prop,
"Parent ID Name",
"If this is set, the panel becomes a sub-panel");
2033 "Panels with lower numbers are default ordered before panels with higher numbers");
2068 "If this is set, the uilist gets a custom ID, otherwise it takes the "
2069 "name of the class used to define the uilist (for example, if the "
2070 "class name is \"OBJECT_UL_vgroups\", and bl_idname is not set by the "
2071 "script, then bl_idname = \"OBJECT_UL_vgroups\")");
2079 prop,
"rna_UIList_list_id_get",
"rna_UIList_list_id_length",
nullptr);
2082 "Identifier of the list, if any was passed to the \"list_id\" "
2083 "parameter of \"template_list()\"");
2098 prop,
"Filter by Name",
"Only show items matching this name (use '*' as wildcard)");
2122 prop,
"Lock Order",
"Lock the order of shown items (user cannot change it)");
2128 "Draw an item in the list (NOTE: when you define your own draw_item "
2129 "function, you may want to check given 'item' is of the right type...)");
2131 parm =
RNA_def_pointer(func,
"context",
"Context",
"",
"The context");
2133 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Layout to draw the item");
2136 func,
"data",
"AnyType",
"",
"Data from which to take Collection property");
2138 parm =
RNA_def_pointer(func,
"item",
"AnyType",
"",
"Item of the collection property");
2141 func,
"icon", 0, 0,
INT_MAX,
"",
"Icon of the item in the collection", 0,
INT_MAX);
2147 "Data from which to take property for the active element");
2154 "Identifier of property in active_data, for the active element");
2157 func,
"index", 0, 0,
INT_MAX,
"",
"Index of the item in the collection", 0,
INT_MAX);
2167 parm =
RNA_def_pointer(func,
"context",
"Context",
"",
"The context");
2169 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"Layout to draw the item");
2176 "Filter and/or re-order items of the collection (output filter results in "
2177 "filter_flags, and reorder results in filter_neworder arrays)");
2179 parm =
RNA_def_pointer(func,
"context",
"Context",
"",
"The context");
2182 func,
"data",
"AnyType",
"",
"Data from which to take Collection property");
2185 func,
"property",
nullptr, 0,
"",
"Identifier of property in data, for the collection");
2192 "An array of filter flags, one for each item in the collection (NOTE: "
2193 "The upper 16 bits, including FILTER_ITEM, are reserved, only use the "
2194 "lower 16 bits for custom usages)");
2202 "An array of indices, one for each item in the collection, mapping the org "
2203 "index to the new one");
2213 "The value of the reserved bitflag 'FILTER_ITEM' (in filter_flags values)");
2241 parm =
RNA_def_pointer(func,
"context",
"Context",
"",
"The context");
2257 "If this is set, the header gets a custom ID, otherwise it takes the "
2258 "name of the class used to define the header; for example, if the "
2259 "class name is \"OBJECT_HT_hello\", and bl_idname is not set by the "
2260 "script, then bl_idname = \"OBJECT_HT_hello\"");
2267 prop,
"Space Type",
"The space where the header is going to be used in");
2276 "The region where the header is going to be used in "
2277 "(defaults to header region)");
2291 "SEARCH_ON_KEY_PRESS",
2293 "Search on Key Press",
2294 "Open a menu search when a key pressed while the menu is open"},
2295 {0,
nullptr, 0,
nullptr,
nullptr},
2309 func,
"If this method returns a non-null output, then the menu can be drawn");
2312 parm =
RNA_def_pointer(func,
"context",
"Context",
"",
"The context");
2319 parm =
RNA_def_pointer(func,
"context",
"Context",
"",
"The context");
2335 "If this is set, the menu gets a custom ID, otherwise it takes the "
2336 "name of the class used to define the menu (for example, if the "
2337 "class name is \"OBJECT_MT_hello\", and bl_idname is not set by the "
2338 "script, then bl_idname = \"OBJECT_MT_hello\")");
2380 "No Asset Dragging",
2381 "Disable the default asset dragging on drag events. Useful for implementing custom "
2382 "dragging via custom key-map items."},
2386 "Visible by Default",
2387 "Unhide the asset shelf when it's available for the first time, otherwise it will be "
2390 "STORE_ENABLED_CATALOGS_IN_PREFERENCES",
2392 "Store Enabled Catalogs in Preferences",
2393 "Store the shelf's enabled catalogs in the preferences rather than the local asset shelf "
2396 "ACTIVATE_FOR_CONTEXT_MENU",
2399 "When spawning a context menu for an asset, activate the asset and call "
2400 "`bl_activate_operator` if present, rather than just highlighting the asset"},
2401 {0,
nullptr, 0,
nullptr,
nullptr},
2408 srna,
"rna_AssetShelf_register",
"rna_AssetShelf_unregister",
nullptr);
2419 "If this is set, the asset gets a custom ID, otherwise it takes the "
2420 "name of the class used to define the asset (for example, if the "
2421 "class name is \"OBJECT_AST_hello\", and bl_idname is not set by the "
2422 "script, then bl_idname = \"OBJECT_AST_hello\")");
2430 "The space where the asset shelf will show up in. Ignored for popup "
2431 "asset shelves which can be displayed in any space.");
2441 "rna_AssetShelf_activate_operator_get",
2442 "rna_AssetShelf_activate_operator_length",
2443 "rna_AssetShelf_activate_operator_set");
2447 "Activate Operator",
2448 "Operator to call when activating an item with asset reference properties");
2452 "rna_AssetShelf_drag_operator_get",
2453 "rna_AssetShelf_drag_operator_length",
2454 "rna_AssetShelf_drag_operator_set");
2459 "Operator to call when dragging an item with asset reference properties");
2466 prop,
"Default Preview Size",
"Default size of the asset preview thumbnails in pixels");
2483 func,
"If this method returns a non-null output, the asset shelf will be visible");
2486 parm =
RNA_def_pointer(func,
"context",
"Context",
"",
"The context");
2492 "Determine if an asset should be visible in the asset shelf. If this method returns a "
2493 "non-null output, the asset will be visible.");
2497 func,
"asset",
"AssetRepresentation",
"",
"The asset to test for visibility");
2503 "Return a reference to the asset that should be highlighted as active in the asset shelf");
2508 "AssetWeakReference",
2510 "The weak reference to the asset to be highlighted as active, or None");
2515 func,
"Draw UI elements into the context menu UI layout displayed on right click");
2517 parm =
RNA_def_pointer(func,
"context",
"Context",
"",
"The context");
2519 parm =
RNA_def_pointer(func,
"asset",
"AssetRepresentation",
"",
"The active asset");
2521 parm =
RNA_def_pointer(func,
"layout",
"UILayout",
"",
"The layout to draw into");
2525 srna,
"rna_AssetShelf_asset_library_get",
"rna_AssetShelf_asset_library_set");
2527 prop,
"Asset Library",
"Choose the asset library to display assets from");
2534 "Show the asset name together with the preview. Otherwise only the "
2535 "preview will be visible.");
2559 "File Handler Type",
2560 "Extends functionality to operators that manages files, such as adding "
2561 "drag and drop support");
2564 srna,
"rna_FileHandler_register",
"rna_FileHandler_unregister",
nullptr);
2577 "If this is set, the file handler gets a custom ID, otherwise it takes the "
2578 "name of the class used to define the file handler (for example, if the "
2579 "class name is \"OBJECT_FH_hello\", and bl_idname is not set by the "
2580 "script, then bl_idname = \"OBJECT_FH_hello\")");
2588 "Operator that can handle import for files with the extensions given in bl_file_extensions");
2595 "Operator that can handle export for files with the extensions given in bl_file_extensions");
2608 "Formatted string of file extensions supported by the file handler, each extension should "
2609 "start with a \".\" and be separated by \";\"."
2610 "\nFor Example: ``\".blend;.ble\"``");
2618 "If this method returns True, can be used to handle the drop of a drag-and-drop action");
2621 parm =
RNA_def_pointer(func,
"context",
"Context",
"",
"The context");
2624 func =
RNA_def_function(srna,
"label_with_extensions",
"rna_FileHandler_label_with_extensions");
2626 func,
"Return the label of the file handler with the given ID, with its file extensions");
#define FH_MAX_FILE_EXTENSIONS_STR
#define ASSET_SHELF_PREVIEW_SIZE_DEFAULT
A dynamically sized string ADT.
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
#define PNL_CATEGORY_FALLBACK
Read Blender memory allocation and freeing.
#define RNA_DYN_DESCR_MAX
#define ND_REGIONS_ASSET_SHELF
#define BLI_assert_msg(a, msg)
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
void free(Subdiv *subdiv)
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 panels_free_instanced(const bContext *C, ARegion *region)
void refresh_for_srna_unregister(Main *bmain, StructRNA *srna_to_unreg)
bool uilist_item_index_is_filtered_visible(const struct uiList *ui_list, int item_idx)
PointerRNA * panel_custom_data_get(const Panel *panel)
void WM_main_add_notifier(uint type, void *reference)
void * BLI_findptr(const ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
PropertyRNA * RNA_function_find_parameter(PointerRNA *, FunctionRNA *func, const char *identifier)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
const char * WM_uilisttype_list_id_get(const uiListType *ult, uiList *list)
@ LAYOUT_PANEL_STATE_FLAG_OPEN
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
char * STRNCPY(char(&dst)[N], const char *src)
void RNA_parameter_get(ParameterList *parms, PropertyRNA *parm, void **r_value)
static void rna_def_layout_panel_state(BlenderRNA *brna)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
int(*)(PointerRNA *ptr, void *data, bool *have_function) StructValidateFunc
void RNA_def_ui(BlenderRNA *brna)
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)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
@ STRUCT_PUBLIC_NAMESPACE_INHERIT
@ STRUCT_NO_DATABLOCK_IDPROPERTIES
bool WM_paneltype_add(PanelType *pt)
const EnumPropertyItem rna_enum_space_type_items[]
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
static void rna_def_header(BlenderRNA *brna)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_struct_system_idprops_func(StructRNA *srna, const char *system_idproperties)
bool RNA_struct_available_or_report(ReportList *reports, const char *identifier)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
static void rna_def_panel(BlenderRNA *brna)
MenuType * WM_menutype_find(const StringRef idname, bool quiet)
const char * RNA_struct_state_owner_get()
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void * RNA_struct_blender_type_get(StructRNA *srna)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
static void rna_def_asset_shelf(BlenderRNA *brna)
const IDFilterEnumPropertyItem rna_enum_id_type_filter_items[]
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
ParameterList * RNA_parameter_list_create(ParameterList *parms, PointerRNA *, FunctionRNA *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
static void rna_def_ui_layout(BlenderRNA *brna)
bool BKE_regiontype_uses_categories(const ARegionType *region_type)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
PropertyRNA * rna_def_asset_library_ui_reference_common(StructRNA *srna, const char *get, const char *set)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void BKE_report(ReportList *reports, eReportType type, const char *message)
BMesh const char void * data
void BLI_insertlinkafter(ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
@ UILST_FLT_ITEM_NEVER_SHOW
const EnumPropertyItem rna_enum_operator_context_items[]
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
int RNA_parameter_dynamic_length_get(ParameterList *parms, PropertyRNA *parm)
static void rna_def_uilist(BlenderRNA *brna)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
LinkData * BLI_genericNodeN(void *data)
static void rna_def_menu(BlenderRNA *brna)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
SpaceType * BKE_spacetype_from_id(int spaceid)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
void(*)(void *data) StructFreeFunc
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg, const char *instance)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void **r_value)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
static void rna_def_ui_textbox_state(BlenderRNA *brna)
const EnumPropertyItem rna_enum_region_type_items[]
bool WM_uilisttype_add(uiListType *ult)
void RNA_def_function_flag(FunctionRNA *func, FunctionFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
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)
bool RNA_struct_bl_idname_ok_or_report(ReportList *reports, const char *identifier, const char *sep)
void RNA_def_struct_flag(StructRNA *srna, StructFlag flag)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
static void rna_def_file_handler(BlenderRNA *brna)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void RNA_api_ui_layout(StructRNA *srna)
void RNA_def_struct_translation_context(StructRNA *srna, const char *context)
@ PANEL_TYPE_HEADER_EXPAND
@ PANEL_TYPE_DEFAULT_CLOSED
@ ASSET_SHELF_TYPE_FLAG_STORE_CATALOGS_IN_PREFS
@ ASSET_SHELF_TYPE_FLAG_ACTIVATE_FOR_CONTEXT_MENU
@ ASSET_SHELF_TYPE_FLAG_NO_ASSET_DRAG
@ ASSET_SHELF_TYPE_FLAG_DEFAULT_VISIBLE
bool WM_menutype_add(MenuType *mt)
const EnumPropertyItem rna_enum_uilist_layout_type_items[]
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, const void *value)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
uiListType * WM_uilisttype_find(const StringRef idname, bool quiet)
bScreen * CTX_wm_screen(const bContext *C)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_define_verify_sdna(bool verify)
void WM_paneltype_remove(PanelType *pt)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
@ PARM_PYFUNC_REGISTER_OPTIONAL
const EnumPropertyItem rna_enum_icon_items[]
void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *rna_ext)
wm::OpCallContext wmOpCallContext
void RNA_def_property_int_default_func(PropertyRNA *prop, const char *get_default)
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)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
int(*)(bContext *C, PointerRNA *ptr, FunctionRNA *func, ParameterList *list) StructCallbackFunc
void WM_uilisttype_remove_ptr(Main *bmain, uiListType *ult)
void RNA_parameter_list_free(ParameterList *parms)
void WM_menutype_freelink(MenuType *mt)
int RNA_collection_length(PointerRNA *ptr, const char *name)
BlenderRNA RNA_blender_rna_get()
StructRNA * RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRNA *srnafrom)
struct AssetShelfType * type
bke::FileHandlerType * type
ListBaseT< Panel > children
char idname[OP_MAX_TYPENAME]
static constexpr float PROPERTY_SPLIT_FACTOR