diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-06-17 10:58:23 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-06-20 12:21:09 +0300 |
commit | e658c8851a2921560ad5df579a8250e1e97b6769 (patch) | |
tree | df5a86c2a7e0f5e1ae1ebae1fcc93b2ee4fdb25b /source/blender/editors/mask/mask_ops.c | |
parent | f8cec1ff303a1892595ed4db59604886ae340043 (diff) |
Refactor: De-duplicate mask operator poll functions
The poll function with same semantic was defined in both screen and
mask space modules. The only reason for this seems to be that the
image editor needed a mask poll function which was private to the
mask module.
Make the mask editing poll functions public, avoiding code duplication.
Also, added a brief explanation about what the poll functions are
checking for.
No user-level changes are expected to happen.
Diffstat (limited to 'source/blender/editors/mask/mask_ops.c')
-rw-r--r-- | source/blender/editors/mask/mask_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index f2e9c94c25b..3ca9f4d06e2 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -113,7 +113,7 @@ void MASK_OT_new(wmOperatorType *ot) /* api callbacks */ ot->exec = mask_new_exec; - ot->poll = ED_operator_mask; + ot->poll = ED_maskedit_poll; /* properties */ RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Name of new mask"); @@ -907,7 +907,7 @@ void MASK_OT_slide_point(wmOperatorType *ot) /* api callbacks */ ot->invoke = slide_point_invoke; ot->modal = slide_point_modal; - ot->poll = ED_operator_mask; + ot->poll = ED_maskedit_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -1297,7 +1297,7 @@ void MASK_OT_slide_spline_curvature(wmOperatorType *ot) /* api callbacks */ ot->invoke = slide_spline_curvature_invoke; ot->modal = slide_spline_curvature_modal; - ot->poll = ED_operator_mask; + ot->poll = ED_maskedit_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; |