WIP: Basic support for registering asset shelf as a type in BPY #104991

Closed
Julian Eisel wants to merge 73 commits from JulianEisel:temp-asset-shelf-type-bpy into asset-shelf

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 2 additions and 5 deletions
Showing only changes of commit 3a34c91448 - Show all commits

View File

@ -3982,8 +3982,6 @@ static uiBut *ui_but_new(const eButType type)
{
uiBut *but = nullptr;
#define NEW_BUT(type_name) MEM_new<type_name>(#type_name)
switch (type) {
case UI_BTYPE_NUM:
but = MEM_new<uiButNumber>("uiButNumber");
@ -4022,10 +4020,9 @@ static uiBut *ui_but_new(const eButType type)
but = MEM_new<uiButViewItem>("uiButViewItem");
break;
default:
but = NEW_BUT(uiBut);
but = MEM_new<uiBut>("uiBut");
break;
}
#undef NEW_BUT
but->type = type;
return but;

View File

@ -121,7 +121,7 @@ static uiBut *ui_but_anim_decorate_find_attached_button(uiButDecorator *but)
BLI_assert(but->rnapoin.data && but->rnaprop);
LISTBASE_CIRCULAR_BACKWARD_BEGIN (uiBut *, &but->block->buttons, but_iter, but->prev) {
if (but_iter != (uiBut *)but &&
if (but_iter != but &&
ui_but_rna_equals_ex(but_iter, &but->rnapoin, but->rnaprop, but->rnaindex)) {
return but_iter;
}