Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-06-29 18:20:33 +0300
committerJulian Eisel <julian@blender.org>2021-06-29 19:20:56 +0300
commit2ff714269e53f9a744242cd6c039ec65a47ec7ec (patch)
tree9c045b9cf56f50a86b7af87bc56a5495813f2e70 /source/blender/editors/include/UI_interface.h
parent63aa6dd845ebdb0f62c95a720e82e554c0208d95 (diff)
UI: Support setting operator properties for `UILayout.operator_menu_enum()`
`UILayout.operator_menu_enum()` now returns the operator properties, just like `UILayout.operator()`. This makes it possible to set options for the operator displayed in the menu. In C it can be done through the new `uiItemMenuEnumFullO()` or `uiItemMenuEnumFullO_ptr()`. It's reasonable to have this, probably just a small thing never bothered to add. D10912 could use it, the following comment can be addressed now too: https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_nla/nla_buttons.c$583-586
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r--source/blender/editors/include/UI_interface.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index b8443b952a8..b23f3e29551 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -2425,12 +2425,20 @@ void uiItemPopoverPanelFromGroup(uiLayout *layout,
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg);
void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN);
-void uiItemMenuEnumO_ptr(uiLayout *layout,
+void uiItemMenuEnumFullO_ptr(uiLayout *layout,
+ struct bContext *C,
+ struct wmOperatorType *ot,
+ const char *propname,
+ const char *name,
+ int icon,
+ struct PointerRNA *r_opptr);
+void uiItemMenuEnumFullO(uiLayout *layout,
struct bContext *C,
- struct wmOperatorType *ot,
+ const char *opname,
const char *propname,
const char *name,
- int icon);
+ int icon,
+ struct PointerRNA *r_opptr);
void uiItemMenuEnumO(uiLayout *layout,
struct bContext *C,
const char *opname,