Cleanup: use return argument prefix
This commit is contained in:
@@ -1020,12 +1020,18 @@ bool UI_context_copy_to_selected_list(
|
||||
|
||||
/* Helpers for Operators */
|
||||
uiBut *UI_context_active_but_get(const struct bContext *C);
|
||||
void UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index);
|
||||
void UI_context_active_but_prop_get(
|
||||
const struct bContext *C,
|
||||
struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index);
|
||||
void UI_context_active_but_prop_handle(struct bContext *C);
|
||||
struct wmOperator *UI_context_active_operator_get(const struct bContext *C);
|
||||
void UI_context_update_anim_flag(const struct bContext *C);
|
||||
void UI_context_active_but_prop_get_filebrowser(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, bool *r_is_undo);
|
||||
void UI_context_active_but_prop_get_templateID(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop);
|
||||
void UI_context_active_but_prop_get_filebrowser(
|
||||
const struct bContext *C,
|
||||
struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, bool *r_is_undo);
|
||||
void UI_context_active_but_prop_get_templateID(
|
||||
struct bContext *C,
|
||||
struct PointerRNA *r_ptr, struct PropertyRNA **r_prop);
|
||||
|
||||
/* Styled text draw */
|
||||
void UI_fontstyle_set(const struct uiFontStyle *fs);
|
||||
|
||||
@@ -8013,20 +8013,21 @@ uiBut *UI_context_active_but_get(const struct bContext *C)
|
||||
}
|
||||
|
||||
/* helper function for insert keyframe, reset to default, etc operators */
|
||||
void UI_context_active_but_prop_get(const bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index)
|
||||
void UI_context_active_but_prop_get(
|
||||
const bContext *C,
|
||||
struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index)
|
||||
{
|
||||
uiBut *activebut = ui_context_rna_button_active(C);
|
||||
|
||||
memset(ptr, 0, sizeof(*ptr));
|
||||
|
||||
if (activebut && activebut->rnapoin.data) {
|
||||
*ptr = activebut->rnapoin;
|
||||
*prop = activebut->rnaprop;
|
||||
*index = activebut->rnaindex;
|
||||
*r_ptr = activebut->rnapoin;
|
||||
*r_prop = activebut->rnaprop;
|
||||
*r_index = activebut->rnaindex;
|
||||
}
|
||||
else {
|
||||
*prop = NULL;
|
||||
*index = 0;
|
||||
memset(r_ptr, 0, sizeof(*r_ptr));
|
||||
*r_prop = NULL;
|
||||
*r_index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -232,15 +232,17 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem)
|
||||
/* This is for browsing and editing the ID-blocks used */
|
||||
|
||||
/* for new/open operators */
|
||||
void UI_context_active_but_prop_get_templateID(bContext *C, PointerRNA *ptr, PropertyRNA **prop)
|
||||
void UI_context_active_but_prop_get_templateID(
|
||||
bContext *C,
|
||||
PointerRNA *r_ptr, PropertyRNA **r_prop)
|
||||
{
|
||||
TemplateID *template;
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
uiBlock *block;
|
||||
uiBut *but;
|
||||
|
||||
memset(ptr, 0, sizeof(*ptr));
|
||||
*prop = NULL;
|
||||
memset(r_ptr, 0, sizeof(*r_ptr));
|
||||
*r_prop = NULL;
|
||||
|
||||
if (!ar)
|
||||
return;
|
||||
@@ -251,8 +253,8 @@ void UI_context_active_but_prop_get_templateID(bContext *C, PointerRNA *ptr, Pro
|
||||
if ((but->flag & (UI_BUT_LAST_ACTIVE | UI_ACTIVE))) {
|
||||
if (but->func_argN) {
|
||||
template = but->func_argN;
|
||||
*ptr = template->ptr;
|
||||
*prop = template->prop;
|
||||
*r_ptr = template->ptr;
|
||||
*r_prop = template->prop;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user