diff options
Diffstat (limited to 'source/blender/editors/include/ED_image.h')
-rw-r--r-- | source/blender/editors/include/ED_image.h | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index f79d3ce205d..91ae8286531 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -24,6 +24,7 @@ struct Scene; struct SpaceImage; struct View2D; struct bContext; +struct Paint; struct wmOperator; struct wmWindowManager; @@ -63,8 +64,11 @@ bool ED_space_image_get_position(struct SpaceImage *sima, /** * Returns color in linear space, matching #ED_space_node_color_sample(). */ -bool ED_space_image_color_sample( - struct SpaceImage *sima, struct ARegion *region, int mval[2], float r_col[3], bool *r_is_data); +bool ED_space_image_color_sample(struct SpaceImage *sima, + struct ARegion *region, + const int mval[2], + float r_col[3], + bool *r_is_data); struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock, int tile); /** * Get the #SpaceImage flag that is valid for the given ibuf. @@ -133,8 +137,39 @@ bool ED_space_image_paint_curve(const struct bContext *C); * Matches clip function. */ bool ED_space_image_check_show_maskedit(struct SpaceImage *sima, struct Object *obedit); + +/* Returns true when the following conditions are met: + * - Current space is Image Editor. + * - The image editor is not a UV Editor. + * - It is set to Mask mode. + * + * It is not required to have mask opened for editing. */ bool ED_space_image_maskedit_poll(struct bContext *C); + +/* Returns true when the following conditions are met: + * - Current space is Image Editor. + * - The image editor is not a UV Editor. + * - It is set to Mask mode. + * - Mask has visible and editable splines. + * + * It is not required to have mask opened for editing. */ +bool ED_space_image_maskedit_visible_splines_poll(struct bContext *C); + +/* Returns true when the following conditions are met: + * - Current space is Image Editor. + * - The image editor is not an UV Editor. + * - It is set to Mask mode. + * - The space has mask opened. */ bool ED_space_image_maskedit_mask_poll(struct bContext *C); + +/* Returns true when the following conditions are met: + * - Current space is Image Editor. + * - The image editor is not an UV Editor. + * - It is set to Mask mode. + * - The space has mask opened. + * - Mask has visible and editable splines. */ +bool ED_space_image_maskedit_mask_visible_splines_poll(struct bContext *C); + bool ED_space_image_cursor_poll(struct bContext *C); /** @@ -173,6 +208,7 @@ typedef struct ImageFrameRange { int length; int offset; /* UDIM tiles. */ + bool udims_detected; ListBase udim_tiles; /* Temporary data. */ @@ -186,6 +222,9 @@ ListBase ED_image_filesel_detect_sequences(struct Main *bmain, struct wmOperator *op, bool detect_udim); +bool ED_image_tools_paint_poll(struct bContext *C); +void ED_paint_cursor_start(struct Paint *p, bool (*poll)(struct bContext *C)); + #ifdef __cplusplus } #endif |