diff options
author | Campbell Barton <campbell@blender.org> | 2022-05-13 09:09:04 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-05-13 09:09:04 +0300 |
commit | 113b8030ced92c23e33717dac97287f8792fd1cb (patch) | |
tree | 8a4cc192d6d31f3b56d92ba71448a0428225d4e2 /source/blender/editors/include/ED_select_utils.h | |
parent | 470cbad51a63c56d8114ccfb3bb408b1d9cb4824 (diff) |
Fix T89909: Circle Select tool status bar doesn't match the operations
Assign get_name functions for select picking and circle select
so modifier keys show the result of holding the modifiers.
Diffstat (limited to 'source/blender/editors/include/ED_select_utils.h')
-rw-r--r-- | source/blender/editors/include/ED_select_utils.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_select_utils.h b/source/blender/editors/include/ED_select_utils.h index dbe1b582132..fa02ebe18f6 100644 --- a/source/blender/editors/include/ED_select_utils.h +++ b/source/blender/editors/include/ED_select_utils.h @@ -14,6 +14,7 @@ extern "C" { struct KDTree_1d; struct wmOperator; +struct wmOperatorType; enum { SEL_TOGGLE = 0, @@ -96,16 +97,23 @@ struct SelectPick_Params { /** * Utility to get #eSelectPickMode from booleans for convenience. */ -eSelectOp ED_select_op_from_operator(struct wmOperator *op) +eSelectOp ED_select_op_from_operator(struct PointerRNA *ptr) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT; /** * Initialize `params` from `op`, * these properties are defined by #WM_operator_properties_mouse_select. */ -void ED_select_pick_params_from_operator(struct wmOperator *op, struct SelectPick_Params *params) +void ED_select_pick_params_from_operator(struct PointerRNA *ptr, struct SelectPick_Params *params) ATTR_NONNULL(1, 2); +/** + * Get-name callback for #wmOperatorType.get_name, this is mainly useful so the selection + * action is shown in the status-bar. + */ +const char *ED_select_pick_get_name(struct wmOperatorType *ot, PointerRNA *ptr); +const char *ED_select_circle_get_name(struct wmOperatorType *ot, PointerRNA *ptr); + #ifdef __cplusplus } #endif |