UI: support operator enums in Quick Favorites #107616
|
@ -609,6 +609,11 @@ bool ED_operator_camera_poll(struct bContext *C);
|
|||
bUserMenu **ED_screen_user_menus_find(const struct bContext *C, uint *r_len);
|
||||
struct bUserMenu *ED_screen_user_menu_ensure(struct bContext *C);
|
||||
|
||||
/** Finds a menu item associated with an operator in user menus (aka Quick Favorites)
|
||||
*
|
||||
* \param op_prop_enum: name of an operator property when the operator is called with an enum (to
|
||||
* be an empty string otherwise)
|
||||
|
||||
*/
|
||||
struct bUserMenuItem_Op *ED_screen_user_menu_item_find_operator(struct ListBase *lb,
|
||||
const struct wmOperatorType *ot,
|
||||
struct IDProperty *prop,
|
||||
|
|
|
@ -235,6 +235,8 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu)
|
|||
NULL);
|
||||
}
|
||||
else {
|
||||
/* umi_op->prop could be used to set other properties but it's currently unsupported.
|
||||
*/
|
||||
uiItemMenuEnumFullO_ptr(menu->layout,
|
||||
Campbell Barton
commented
It's possible we want to support assigning additional properties even with Nevertheless, it's worth adding a comment that It's possible we want to support assigning additional properties even with `op_prop_enum` set, although I'm not sure if there are practical cases which would use this of hand.
Nevertheless, it's worth adding a comment that `umi_op->prop` could be used to set other properties but it's currently unsupported.
Philipp Oeser
commented
added that comment added that comment
|
||||
C,
|
||||
ot,
|
||||
|
|
Loading…
Reference in New Issue
Doc-string should note this is to be an empty string when not set.
done