WIP: Basic support for registering asset shelf as a type in BPY #104991
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue