diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 16:55:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 17:14:10 +0300 |
commit | 61776befc3f88c373e47ccbdf8c75e2ca0f4e987 (patch) | |
tree | 0214b7c5146300d41b7bcbe99f87c92599608e7f /source/blender/editors/space_image | |
parent | 8f1997975dc60bc1c18992458603ecd58dfded6d (diff) |
Cleanup: move public doc-strings into headers for 'editors'
Ref T92709
Diffstat (limited to 'source/blender/editors/space_image')
8 files changed, 12 insertions, 26 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 6a50f6d42e8..4b8388a0002 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -63,7 +63,6 @@ #define B_NOP -1 #define MAX_IMAGE_INFO_LEN 128 -/* gets active viewer user */ struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree) { bNode *node; diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index d76b1842c94..ade5993cdb9 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -135,7 +135,6 @@ static void draw_render_info( } } -/* used by node view too */ void ED_image_draw_info(Scene *scene, ARegion *region, bool color_manage, @@ -614,11 +613,6 @@ void ED_space_image_grid_steps(SpaceImage *sima, } } -/** - * Calculate the increment snapping value for UV/image editor based on the zoom factor - * The code in here (except the offset part) is used in `grid_frag.glsl` (see `grid_res`) for - * drawing the grid overlay for the UV/Image editor. - */ float ED_space_image_increment_snap_value(const int grid_dimesnions, const float grid_steps[SI_GRID_STEPS_LEN], const float zoom_factor) diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c index 05124f49a20..470cff20718 100644 --- a/source/blender/editors/space_image/image_edit.c +++ b/source/blender/editors/space_image/image_edit.c @@ -177,7 +177,6 @@ void ED_space_image_release_buffer(SpaceImage *sima, ImBuf *ibuf, void *lock) } } -/* Get the SpaceImage flag that is valid for the given ibuf. */ int ED_space_image_get_display_channel_mask(ImBuf *ibuf) { int result = (SI_USE_ALPHA | SI_SHOW_ALPHA | SI_SHOW_ZBUF | SI_SHOW_R | SI_SHOW_G | SI_SHOW_B); @@ -318,7 +317,6 @@ void ED_image_get_uv_aspect(Image *ima, ImageUser *iuser, float *r_aspx, float * } } -/* takes event->mval */ void ED_image_mouse_pos(SpaceImage *sima, const ARegion *region, const int mval[2], float co[2]) { int sx, sy, width, height; @@ -377,10 +375,6 @@ void ED_image_point_pos__reverse(SpaceImage *sima, r_co[1] = (co[1] * height * zoomy) + (float)sy; } -/** - * This is more a user-level functionality, for going to `next/prev` used slot, - * Stepping onto the last unused slot too. - */ bool ED_image_slot_cycle(struct Image *image, int direction) { const int cur = image->render_slot; @@ -482,7 +476,6 @@ bool ED_space_image_show_uvedit(const SpaceImage *sima, Object *obedit) return false; } -/* matches clip function */ bool ED_space_image_check_show_maskedit(SpaceImage *sima, Object *obedit) { /* check editmode - this is reserved for UV editing */ diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index 6af0f3a416b..63c537467f7 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -36,11 +36,13 @@ struct wmOperatorType; extern const char *image_context_dir[]; /* doc access */ /* image_draw.c */ + void draw_image_main_helpers(const struct bContext *C, struct ARegion *region); void draw_image_cache(const struct bContext *C, struct ARegion *region); void draw_image_sample_line(struct SpaceImage *sima); /* image_ops.c */ + bool space_image_main_region_poll(struct bContext *C); bool space_image_view_center_cursor_poll(struct bContext *C); @@ -59,7 +61,13 @@ void IMAGE_OT_view_ndof(struct wmOperatorType *ot); #endif void IMAGE_OT_new(struct wmOperatorType *ot); +/** + * Called by other space types too. + */ void IMAGE_OT_open(struct wmOperatorType *ot); +/** + * Called by other space types too. + */ void IMAGE_OT_match_movie_length(struct wmOperatorType *ot); void IMAGE_OT_replace(struct wmOperatorType *ot); void IMAGE_OT_reload(struct wmOperatorType *ot); @@ -94,5 +102,9 @@ void IMAGE_OT_tile_remove(struct wmOperatorType *ot); void IMAGE_OT_tile_fill(struct wmOperatorType *ot); /* image_panels.c */ + +/** + * Gets active viewer user. + */ struct ImageUser *ntree_get_active_iuser(struct bNodeTree *ntree); void image_buttons_register(struct ARegionType *art); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 44794439f5f..da4ba8fd857 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1499,7 +1499,6 @@ static void image_open_draw(bContext *UNUSED(C), wmOperator *op) } } -/* called by other space types too */ void IMAGE_OT_open(wmOperatorType *ot) { /* identifiers */ @@ -1574,7 +1573,6 @@ static int image_match_len_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -/* called by other space types too */ void IMAGE_OT_match_movie_length(wmOperatorType *ot) { /* identifiers */ @@ -3190,7 +3188,6 @@ void IMAGE_OT_unpack(wmOperatorType *ot) /** \name Sample Image Operator * \{ */ -/* Returns mouse position in image space. */ bool ED_space_image_get_position(SpaceImage *sima, struct ARegion *region, int mval[2], @@ -3210,7 +3207,6 @@ bool ED_space_image_get_position(SpaceImage *sima, return true; } -/* Returns color in linear space, matching ED_space_node_color_sample(). */ bool ED_space_image_color_sample( SpaceImage *sima, ARegion *region, int mval[2], float r_col[3], bool *r_is_data) { diff --git a/source/blender/editors/space_image/image_sequence.c b/source/blender/editors/space_image/image_sequence.c index c4f111264a3..87bff913ff2 100644 --- a/source/blender/editors/space_image/image_sequence.c +++ b/source/blender/editors/space_image/image_sequence.c @@ -217,7 +217,6 @@ static void image_detect_frame_range(ImageFrameRange *range, const bool detect_u } } -/* Used for both images and volume file loading. */ ListBase ED_image_filesel_detect_sequences(Main *bmain, wmOperator *op, const bool detect_udim) { ListBase ranges; diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c index 3fbcc8348c8..e81f3b6a490 100644 --- a/source/blender/editors/space_image/image_undo.c +++ b/source/blender/editors/space_image/image_undo.c @@ -989,7 +989,6 @@ static void image_undosys_foreach_ID_ref(UndoStep *us_p, } } -/* Export for ED_undo_sys. */ void ED_image_undosys_type(UndoType *ut) { ut->name = "Image"; @@ -1040,7 +1039,6 @@ ListBase *ED_image_paint_tile_list_get(void) return &us->paint_tiles; } -/* Restore painting image to previous state. Used for anchored and drag-dot style brushes. */ void ED_image_undo_restore(UndoStep *us) { ListBase *paint_tiles = &((ImageUndoStep *)us)->paint_tiles; @@ -1059,10 +1057,6 @@ static ImageUndoStep *image_undo_push_begin(const char *name, int paint_mode) return us; } -/** - * The caller is responsible for running #ED_image_undo_push_end, - * failure to do so causes an invalid state for the undo system. - */ void ED_image_undo_push_begin(const char *name, int paint_mode) { image_undo_push_begin(name, paint_mode); diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 516ffcd1e75..dad494e6984 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -1042,7 +1042,6 @@ static void image_space_subtype_item_extend(bContext *UNUSED(C), /**************************** spacetype *****************************/ -/* only called once, from space/spacetypes.c */ void ED_spacetype_image(void) { SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype image"); |