UI: Asset Shelf (Experimental Feature) #104831
|
@ -752,6 +752,7 @@ static bool ui_but_equals_old(const uiBut *but, const uiBut *oldbut)
|
||||||
if (but->func != oldbut->func) {
|
if (but->func != oldbut->func) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
/* Looks a bit confusing, but simply compares the contained function pointers. */
|
||||||
if (but->apply_func.target<void(bContext &)>() != oldbut->apply_func.target<void(bContext &)>())
|
if (but->apply_func.target<void(bContext &)>() != oldbut->apply_func.target<void(bContext &)>())
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -466,47 +466,47 @@ struct uiHandleButtonData {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct uiAfterFunc {
|
struct uiAfterFunc {
|
||||||
uiAfterFunc *next = nullptr, *prev = nullptr;
|
uiAfterFunc *next, *prev;
|
||||||
|
|
||||||
uiButHandleFunc func = nullptr;
|
uiButHandleFunc func;
|
||||||
void *func_arg1 = nullptr;
|
void *func_arg1;
|
||||||
void *func_arg2 = nullptr;
|
void *func_arg2;
|
||||||
/** C++ version of #func above, without need for void pointer arguments. */
|
/** C++ version of #func above, without need for void pointer arguments. */
|
||||||
std::function<void(bContext &)> apply_func;
|
std::function<void(bContext &)> apply_func;
|
||||||
|
|
||||||
uiButHandleNFunc funcN = nullptr;
|
uiButHandleNFunc funcN;
|
||||||
void *func_argN = nullptr;
|
void *func_argN;
|
||||||
|
|
||||||
uiButHandleRenameFunc rename_func = nullptr;
|
uiButHandleRenameFunc rename_func;
|
||||||
void *rename_arg1 = nullptr;
|
void *rename_arg1;
|
||||||
void *rename_orig = nullptr;
|
void *rename_orig;
|
||||||
|
|
||||||
uiBlockHandleFunc handle_func = nullptr;
|
uiBlockHandleFunc handle_func;
|
||||||
void *handle_func_arg = nullptr;
|
void *handle_func_arg;
|
||||||
int retval = 0;
|
int retval;
|
||||||
|
|
||||||
uiMenuHandleFunc butm_func = nullptr;
|
uiMenuHandleFunc butm_func;
|
||||||
void *butm_func_arg = nullptr;
|
void *butm_func_arg;
|
||||||
int a2 = 0;
|
int a2;
|
||||||
|
|
||||||
wmOperator *popup_op = nullptr;
|
wmOperator *popup_op;
|
||||||
wmOperatorType *optype = nullptr;
|
wmOperatorType *optype;
|
||||||
wmOperatorCallContext opcontext;
|
wmOperatorCallContext opcontext;
|
||||||
PointerRNA *opptr = nullptr;
|
PointerRNA *opptr;
|
||||||
|
|
||||||
PointerRNA rnapoin = {};
|
PointerRNA rnapoin;
|
||||||
PropertyRNA *rnaprop = nullptr;
|
PropertyRNA *rnaprop;
|
||||||
|
|
||||||
void *search_arg = nullptr;
|
void *search_arg;
|
||||||
uiFreeArgFunc search_arg_free_fn = nullptr;
|
uiFreeArgFunc search_arg_free_fn;
|
||||||
|
|
||||||
uiBlockInteraction_CallbackData custom_interaction_callbacks = {};
|
uiBlockInteraction_CallbackData custom_interaction_callbacks;
|
||||||
uiBlockInteraction_Handle *custom_interaction_handle = nullptr;
|
uiBlockInteraction_Handle *custom_interaction_handle;
|
||||||
|
|
||||||
bContextStore *context = nullptr;
|
bContextStore *context;
|
||||||
|
|
||||||
char undostr[BKE_UNDO_STR_MAX] = "";
|
char undostr[BKE_UNDO_STR_MAX];
|
||||||
char drawstr[UI_MAX_DRAW_STR] = "";
|
char drawstr[UI_MAX_DRAW_STR];
|
||||||
};
|
};
|
||||||
|
|
||||||
static void button_activate_init(bContext *C,
|
static void button_activate_init(bContext *C,
|
||||||
|
@ -755,6 +755,9 @@ static ListBase UIAfterFuncs = {nullptr, nullptr};
|
||||||
static uiAfterFunc *ui_afterfunc_new()
|
static uiAfterFunc *ui_afterfunc_new()
|
||||||
{
|
{
|
||||||
uiAfterFunc *after = MEM_new<uiAfterFunc>(__func__);
|
uiAfterFunc *after = MEM_new<uiAfterFunc>(__func__);
|
||||||
|
/* Safety asserts to check if members were 0 initialized properly. */
|
||||||
|
BLI_assert(after->next == nullptr && after->prev == nullptr);
|
||||||
|
BLI_assert(after->undostr[0] == '\0');
|
||||||
|
|
||||||
BLI_addtail(&UIAfterFuncs, after);
|
BLI_addtail(&UIAfterFuncs, after);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue