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:
authorSergey Sharybin <sergey@blender.org>2022-06-17 10:58:23 +0300
committerSergey Sharybin <sergey@blender.org>2022-06-20 12:21:09 +0300
commite658c8851a2921560ad5df579a8250e1e97b6769 (patch)
treedf5a86c2a7e0f5e1ae1ebae1fcc93b2ee4fdb25b /source/blender/editors/include/ED_mask.h
parentf8cec1ff303a1892595ed4db59604886ae340043 (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/include/ED_mask.h')
-rw-r--r--source/blender/editors/include/ED_mask.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h
index 7039d6d9fc7..92df3d8d682 100644
--- a/source/blender/editors/include/ED_mask.h
+++ b/source/blender/editors/include/ED_mask.h
@@ -22,6 +22,19 @@ struct wmKeyConfig;
/* mask_edit.c */
+/* Returns true when the following conditions are met:
+ * - Current space supports mask editing.
+ * - The space is configured to interact with mask.
+ *
+ * It is not required to have mask opened for editing. */
+bool ED_maskedit_poll(struct bContext *C);
+
+/* Returns true when the following conditions are met:
+ * - Current space supports mask editing.
+ * - The space is configured to interact with mask.
+ * - The space has mask open for editing. */
+bool ED_maskedit_mask_poll(struct bContext *C);
+
void ED_mask_deselect_all(const struct bContext *C);
void ED_operatortypes_mask(void);