diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 9 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 112 | ||||
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 21 | ||||
-rw-r--r-- | source/blender/editors/interface/interface.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 8 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 9 |
9 files changed, 93 insertions, 78 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index bd83bdae31b..9564b662b12 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -3414,12 +3414,13 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data) /* ----------- Public API --------------- */ -/* This function filters the active data source to leave only animation channels suitable for +/** + * This function filters the active data source to leave only animation channels suitable for * usage by the caller. It will return the length of the list * - * *anim_data: is a pointer to a ListBase, to which the filtered animation channels - * will be placed for use. - * filter_mode: how should the data be filtered - bitmapping accessed flags + * \param anim_data: Is a pointer to a #ListBase, + * to which the filtered animation channels will be placed for use. + * \param filter_mode: how should the data be filtered - bit-mapping accessed flags. */ size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 422b5e0c1b9..4bb598fa530 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -94,7 +94,7 @@ /* Context Wrangling... */ /** - * Get pointer to active Grease Pencil datablock, + * Get pointer to active Grease Pencil data-block, * and an RNA-pointer to trace back to whatever owns it, * when context info is not available. */ @@ -107,7 +107,7 @@ bGPdata **ED_gpencil_data_get_pointers_direct(ScrArea *area, Object *ob, Pointer switch (area->spacetype) { case SPACE_PROPERTIES: /* properties */ case SPACE_INFO: /* header info */ - case SPACE_TOPBAR: /* Topbar */ + case SPACE_TOPBAR: /* Top-bar */ case SPACE_VIEW3D: /* 3D-View */ { if (ob && (ob->type == OB_GPENCIL)) { @@ -132,7 +132,7 @@ bGPdata **ED_gpencil_data_get_pointers_direct(ScrArea *area, Object *ob, Pointer } /** - * Get pointer to active Grease Pencil datablock for annotations, + * Get pointer to active Grease Pencil data-block for annotations, * and an RNA-pointer to trace back to whatever owns it, * when context info is not available. */ @@ -154,7 +154,7 @@ bGPdata **ED_annotation_data_get_pointers_direct(ID *screen_id, break; } - case SPACE_TOPBAR: /* Topbar */ + case SPACE_TOPBAR: /* Top-bar */ case SPACE_VIEW3D: /* 3D-View */ { if (r_ptr) { @@ -237,8 +237,10 @@ bGPdata **ED_annotation_data_get_pointers_direct(ID *screen_id, return NULL; } -/* Get pointer to active Grease Pencil datablock, - * and an RNA-pointer to trace back to whatever owns it. */ +/** + * Get pointer to active Grease Pencil data-block, + * and an RNA-pointer to trace back to whatever owns it. + */ bGPdata **ED_gpencil_data_get_pointers(const bContext *C, PointerRNA *r_ptr) { ScrArea *area = CTX_wm_area(C); @@ -247,8 +249,10 @@ bGPdata **ED_gpencil_data_get_pointers(const bContext *C, PointerRNA *r_ptr) return ED_gpencil_data_get_pointers_direct(area, ob, r_ptr); } -/* Get pointer to active Grease Pencil datablock, - * and an RNA-pointer to trace back to whatever owns it. */ +/** + * Get pointer to active Grease Pencil data-block, + * and an RNA-pointer to trace back to whatever owns it. + */ bGPdata **ED_annotation_data_get_pointers(const bContext *C, PointerRNA *r_ptr) { ID *screen_id = (ID *)CTX_wm_screen(C); @@ -259,14 +263,14 @@ bGPdata **ED_annotation_data_get_pointers(const bContext *C, PointerRNA *r_ptr) } /* -------------------------------------------------------- */ -/* Get the active Grease Pencil datablock, when context is not available */ +/* Get the active Grease Pencil data-block, when context is not available */ bGPdata *ED_gpencil_data_get_active_direct(ScrArea *area, Object *ob) { bGPdata **gpd_ptr = ED_gpencil_data_get_pointers_direct(area, ob, NULL); return (gpd_ptr) ? *(gpd_ptr) : NULL; } -/* Get the active Grease Pencil datablock, when context is not available */ +/* Get the active Grease Pencil data-block, when context is not available */ bGPdata *ED_annotation_data_get_active_direct(ID *screen_id, ScrArea *area, Scene *scene) { bGPdata **gpd_ptr = ED_annotation_data_get_pointers_direct(screen_id, area, scene, NULL); @@ -274,7 +278,7 @@ bGPdata *ED_annotation_data_get_active_direct(ID *screen_id, ScrArea *area, Scen } /** - * Get the active Grease Pencil datablock + * Get the active Grease Pencil data-block */ bGPdata *ED_gpencil_data_get_active(const bContext *C) { @@ -286,9 +290,9 @@ bGPdata *ED_gpencil_data_get_active(const bContext *C) } /** - * Get the active Grease Pencil datablock - * \note This is the original (bmain) copy of the datablock, stored in files. - * Do not use for reading evaluated copies of GP Objects data + * Get the active Grease Pencil data-block + * \note This is the original (#G.main) copy of the data-block, stored in files. + * Do not use for reading evaluated copies of GP Objects data. */ bGPdata *ED_annotation_data_get_active(const bContext *C) { @@ -296,11 +300,11 @@ bGPdata *ED_annotation_data_get_active(const bContext *C) return (gpd_ptr) ? *(gpd_ptr) : NULL; } /** - * Get the evaluated copy of the active Grease Pencil datablock (where applicable) - * - For the 3D View (i.e. "GP Objects"), this gives the evaluated copy of the GP datablock - * (i.e. a copy of the active GP datablock for the active object, where modifiers have been + * Get the evaluated copy of the active Grease Pencil data-block (where applicable) + * - For the 3D View (i.e. "GP Objects"), this gives the evaluated copy of the GP data-block + * (i.e. a copy of the active GP data-block for the active object, where modifiers have been * applied). This is needed to correctly work with "Copy-on-Write". - * - For all other editors (i.e. "GP Annotations"), this just gives the active datablock + * - For all other editors (i.e. "GP Annotations"), this just gives the active data-block * like for #ED_gpencil_data_get_active() */ bGPdata *ED_gpencil_data_get_active_evaluated(const bContext *C) @@ -323,8 +327,7 @@ bGPdata *ED_gpencil_data_get_active_evaluated(const bContext *C) bool ED_gpencil_data_owner_is_annotation(PointerRNA *owner_ptr) { /* Key Assumption: If the pointer is an object, we're dealing with a GP Object's data. - * Otherwise, the GP datablock is being used for annotations (i.e. everywhere else) - */ + * Otherwise, the GP data-block is being used for annotations (i.e. everywhere else). */ return ((owner_ptr) && (owner_ptr->type != &RNA_Object)); } @@ -528,7 +531,6 @@ const EnumPropertyItem *ED_gpencil_material_enum_itemf(bContext *C, * Check whether a given stroke segment is inside a circular brush * * \param mval: The current screen-space coordinates (midpoint) of the brush - * \param mvalo: The previous screen-space coordinates (midpoint) of the brush (NOT CURRENTLY USED) * \param rad: The radius of the brush * * \param x0, y0: The screen-space x and y coordinates of the start of the stroke segment @@ -765,8 +767,8 @@ void gp_point_to_xy( * Use this version to solve "stair-step" artifacts which may arise when * roundtripping the calculations. * - * \param r_x[out]: The screen-space x-coordinate of the point. - * \param r_y[out]: The screen-space y-coordinate of the point. + * \param r_x: The screen-space x-coordinate of the point. + * \param r_y: The screen-space y-coordinate of the point. * * \warning This assumes that the caller has already checked * whether the stroke in question can be drawn. @@ -936,9 +938,9 @@ bool gp_point_xy_to_3d(const GP_SpaceConversion *gsc, * Convert tGPspoint (temporary 2D/screenspace point data used by GP modal operators) * to 3D coordinates. * - * \param point2D: The screenspace 2D point data to convert. + * \param point2D: The screen-space 2D point data to convert. * \param depth: Depth array (via #ED_view3d_autodist_depth()). - * \param[out] r_out: The resulting 2D point data. + * \param r_out: The resulting 2D point data. */ void gp_stroke_convertcoords_tpoint(Scene *scene, ARegion *region, @@ -983,7 +985,7 @@ void gp_stroke_convertcoords_tpoint(Scene *scene, /** * Get drawing reference point for conversion or projection of the stroke - * \param[out] r_vec : Reference point found + * \param r_vec: Reference point found */ void ED_gpencil_drawing_reference_get(const Scene *scene, const Object *ob, @@ -1252,7 +1254,7 @@ void ED_gpencil_stroke_reproject(Depsgraph *depsgraph, /** * Reproject given point to a plane locked to axis to avoid stroke offset - * \param[in,out] pt: Point to affect + * \param pt: Point to affect (used for input & output). */ void ED_gp_project_point_to_plane(const Scene *scene, const Object *ob, @@ -1811,7 +1813,9 @@ static bool gp_brush_cursor_poll(bContext *C) return false; } -/* Helper callback for drawing the cursor itself */ +/** + * Helper callback for drawing the cursor itself. + */ static void gp_brush_cursor_draw(bContext *C, int x, int y, void *customdata) { Scene *scene = CTX_data_scene(C); @@ -1831,7 +1835,7 @@ static void gp_brush_cursor_draw(bContext *C, int x, int y, void *customdata) float radius = 3.0f; int mval_i[2] = {x, y}; - /* check if cursor is in drawing region and has valid datablock */ + /* Check if cursor is in drawing region and has valid data-block. */ if ((!gp_check_cursor_region(C, mval_i)) || (gpd == NULL)) { return; } @@ -2082,7 +2086,9 @@ void ED_gpencil_setup_modes(bContext *C, bGPdata *gpd, int newmode) } } -/* helper to convert 2d to 3d for simple drawing buffer */ +/** + * Helper to convert 2d to 3d for simple drawing buffer. + */ static void gpencil_stroke_convertcoords(ARegion *region, const tGPspoint *point2D, const float origin[3], @@ -2108,7 +2114,9 @@ static void gpencil_stroke_convertcoords(ARegion *region, } } -/* convert 2d tGPspoint to 3d bGPDspoint */ +/** + * Convert 2d #tGPspoint to 3d #bGPDspoint. + */ void ED_gpencil_tpoint_to_point(ARegion *region, float origin[3], const tGPspoint *tpt, @@ -2126,7 +2134,9 @@ void ED_gpencil_tpoint_to_point(ARegion *region, pt->uv_rot = tpt->uv_rot; } -/* recalc uv for any stroke using the material */ +/** + * Recalculate UV for any stroke using the material. + */ void ED_gpencil_update_color_uv(Main *bmain, Material *mat) { Material *gps_ma = NULL; @@ -2297,7 +2307,7 @@ static void gp_insert_point( gp_copy_points(gps, pt, pt_final, i, i2); copy_v3_v3(&pt_final->x, (i == a_idx) ? co_a : co_b); - /* unselect */ + /* Un-select. */ pt_final->flag &= ~GP_SPOINT_SELECT; /* tag to avoid more checking with this point */ pt_final->flag |= GP_SPOINT_TAG; @@ -2305,7 +2315,7 @@ static void gp_insert_point( i2++; } - /* Calc geometry data. */ + /* Calculate geometry data. */ BKE_gpencil_stroke_geometry_update(gps); MEM_SAFE_FREE(temp_points); @@ -2611,7 +2621,10 @@ void ED_gpencil_select_toggle_all(bContext *C, int action) } } -/* Ensure the SBuffer (while drawing stroke) size is enough to save all points of the stroke */ +/** + * Ensure the #tGPspoint buffer (while drawing stroke) + * size is enough to save all points of the stroke. + */ tGPspoint *ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array, int *buffer_size, int *buffer_used, @@ -2662,10 +2675,12 @@ void ED_gpencil_sbuffer_update_eval(bGPdata *gpd, Object *ob_eval) gpd_eval->runtime.cp_points = gpd->runtime.cp_points; } -/* Tag all scene grease pencil object to update. */ +/** + * Tag all scene grease pencil object to update. + */ void ED_gpencil_tag_scene_gpencil(Scene *scene) { - /* mark all grease pencil datablocks of the scene */ + /* Mark all grease pencil data-blocks of the scene. */ FOREACH_SCENE_COLLECTION_BEGIN (scene, collection) { FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (collection, ob) { if (ob->type == OB_GPENCIL) { @@ -2749,7 +2764,7 @@ void ED_gpencil_init_random_settings(Brush *brush, random_settings->pressure = BLI_hash_int_01(BLI_hash_int_2d(ix + iz, iy + iz)) * 2.0f - 1.0f; } - /* Randomn to color strength. */ + /* Random to color strength. */ if (brush_settings->draw_random_strength) { random_settings->strength = BLI_hash_int_01(BLI_hash_int_2d(ix + iy, iy + iz + ix)) * 2.0f - 1.0f; @@ -2882,8 +2897,8 @@ void ED_gpencil_sbuffer_vertex_color_set(Depsgraph *depsgraph, /* Random Color. */ gpencil_sbuffer_vertex_color_random(gpd, brush, tpt, random_color, pen_pressure); - /* Copy to eval data because paint operators don't tag refresh until end for speedup - painting. */ + /* Copy to evaluate data because paint operators don't tag refresh until end for speedup + * painting. */ if (gpd_eval != NULL) { copy_v4_v4(gpd_eval->runtime.vert_color_fill, gpd->runtime.vert_color_fill); gpd_eval->runtime.matid = gpd->runtime.matid; @@ -2926,7 +2941,7 @@ bool ED_gpencil_stroke_check_collision(GP_SpaceConversion *gsc, rcti rect_stroke = {boundbox_min[0], boundbox_max[0], boundbox_min[1], boundbox_max[1]}; - /* For mouse, add a small offet to avoid false negative in corners. */ + /* For mouse, add a small offset to avoid false negative in corners. */ rcti rect_mouse = {mouse[0] - offset, mouse[0] + offset, mouse[1] - offset, mouse[1] + offset}; /* Check collision between both rectangles. */ @@ -2934,12 +2949,13 @@ bool ED_gpencil_stroke_check_collision(GP_SpaceConversion *gsc, } /** - * Check if a point is inside of the stroke - * \param gps: Stroke to check - * \param gsc: SpaceConversion data - * \param mouse: Mouse position - * \param diff_mat: View matrix - * \return True if the point is inside + * Check if a point is inside of the stroke. + * + * \param gps: Stroke to check. + * \param gsc: Space conversion data. + * \param mouse: Mouse position. + * \param diff_mat: View matrix. + * \return True if the point is inside. */ bool ED_gpencil_stroke_point_is_inside(bGPDstroke *gps, GP_SpaceConversion *gsc, @@ -2964,7 +2980,7 @@ bool ED_gpencil_stroke_point_is_inside(bGPDstroke *gps, gp_point_to_xy(gsc, gps, &pt2, &mcoords[i][0], &mcoords[i][1]); } - /* Compute boundbox of lasso (for faster testing later). */ + /* Compute bound-box of lasso (for faster testing later). */ rcti rect; BLI_lasso_boundbox(&rect, mcoords, len); diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index f46ef3ff1be..3aecec0d6b6 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -281,10 +281,13 @@ typedef enum eAnim_Update_Flags { /* filtering flags - under what circumstances should a channel be returned */ typedef enum eAnimFilter_Flags { - /** data which channel represents is fits the dopesheet filters - * (i.e. scene visibility criteria) */ - /* XXX: it's hard to think of any examples where this *ISN'T* the case... - * perhaps becomes implicit?. */ + /** + * Data which channel represents is fits the dope-sheet filters + * (i.e. scene visibility criteria). + * + * XXX: it's hard to think of any examples where this *ISN'T* the case... + * perhaps becomes implicit?. + */ ANIMFILTER_DATA_VISIBLE = (1 << 0), /** channel is visible within the channel-list hierarchy * (i.e. F-Curves within Groups in ActEdit) */ @@ -297,7 +300,7 @@ typedef enum eAnimFilter_Flags { /** for its type, channel should be "active" one */ ANIMFILTER_ACTIVE = (1 << 4), - /** channel is a child of the active group (* Actions speciality) */ + /** channel is a child of the active group (* Actions specialty) */ ANIMFILTER_ACTGROUPED = (1 << 5), /** channel must be selected/not-selected, but both must not be set together */ @@ -310,8 +313,10 @@ typedef enum eAnimFilter_Flags { * for Graph Editor's option for keys on select curves only */ ANIMFILTER_SELEDIT = (1 << 9), - /** flags used to enforce certain data types - * \node the ones for curves and NLA tracks were redundant and have been removed for now... + /** + * Flags used to enforce certain data types. + * + * \note The ones for curves and NLA tracks were redundant and have been removed for now. */ ANIMFILTER_ANIMDATA = (1 << 10), @@ -321,7 +326,7 @@ typedef enum eAnimFilter_Flags { /** for checking if we should keep some collapsed channel around (internal use only!) */ ANIMFILTER_TMP_PEEK = (1 << 30), - /** ignore ONLYSEL flag from filterflag, (internal use only!) */ + /** Ignore ONLYSEL flag from #bDopeSheet.filterflag (internal use only!) */ ANIMFILTER_TMP_IGNORE_ONLYSEL = (1u << 31), } eAnimFilter_Flags; diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 04c259ab092..8684156ceef 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -6422,7 +6422,7 @@ void UI_but_func_search_set_context_menu(uiBut *but, uiButSearchContextMenuFn co } /** - * \param separator_string: when not NULL, this string is used as a separator, + * \param search_sep_string: when not NULL, this string is used as a separator, * showing the icon and highlighted text after the last instance of this string. */ void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string) diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index d9402261175..720a5bcff37 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -799,10 +799,8 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(region), * * \note This function is to be used with the 2D dashed shader enabled. * - * \param pos: is a PRIM_FLOAT, 2, GPU_FETCH_FLOAT vertex attribute. - * \param line_origin: is a PRIM_FLOAT, 2, GPU_FETCH_FLOAT vertex attribute. - * - * The next 4 parameters are the offsets for the view, not the zones. + * \param pos: is a #PRIM_FLOAT, 2, #GPU_FETCH_FLOAT vertex attribute. + * \param x1, x2, y1, y2: The offsets for the view, not the zones. */ void UI_draw_safe_areas(uint pos, float x1, @@ -835,7 +833,7 @@ void UI_draw_safe_areas(uint pos, static void draw_scope_end(const rctf *rect, GLint *scissor) { - /* restore scissortest */ + /* Restore scissor test. */ GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]); GPU_blend_set_func_separate( diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 54a9eced0da..a182dd662af 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2355,9 +2355,9 @@ BLI_INLINE bool streq_array_any(const char *s, const char *arr[]) /** * Builds the panel layout for the input \a panel or type \a pt. * - * \param panel The panel to draw. Can be null, in which case a panel with the type of \a pt will - * be created. - * \param unique_panel_str A unique identifier for the name of the \a uiBlock associated with the + * \param panel: The panel to draw. Can be null, + * in which case a panel with the type of \a pt will be created. + * \param unique_panel_str: A unique identifier for the name of the \a uiBlock associated with the * panel. Used when the panel is an instanced panel so a unique identifier is needed to find the * correct old \a uiBlock, and NULL otherwise. */ diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 63c33d767e4..e03e7958595 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1311,7 +1311,7 @@ static void paint_mesh_restore_co(Sculpt *sd, Object *ob) /** * Disable OpenMP when dynamic-topology is enabled. Otherwise, new entries might be inserted by - * #sculpt_undo_push_node() into the GHash used internally by #BM_log_original_vert_co() + * #SCULPT_undo_push_node() into the #GHash used internally by #BM_log_original_vert_co() * by a different thread. See T33787. */ SculptThreadedTaskData data = { .sd = sd, diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index e04e592b32d..c0343900f8b 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -85,7 +85,7 @@ static void test_line_start(char c, bool *r_last_state) /** * This function converts the indentation tabs from a buffer to spaces. - * \param buf: A pointer to a cstring. + * \param in_buf: A pointer to a cstring. * \param tab_size: The size, in spaces, of the tab character. */ static char *buf_tabs_to_spaces(const char *in_buf, const int tab_size) diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 3cbf3d965de..f4b1916f285 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -375,9 +375,6 @@ typedef void (*IterSnapObjsCallback)(SnapObjectContext *sctx, /** * Walks through all objects in the scene to create the list of objects to snap. - * - * \param sctx: Snap context to store data. - * \param snap_select: from enum #eSnapSelect. */ static void iter_snap_objects(SnapObjectContext *sctx, Depsgraph *depsgraph, @@ -1071,9 +1068,7 @@ static void raycast_obj_fn(SnapObjectContext *sctx, * Walks through all objects in the scene to find the `hit` on object surface. * * \param sctx: Snap context to store data. - * \param snap_select: from enum eSnapSelect. - * \param use_object_edit_cage: Uses the coordinates of BMesh(if any) to do the snapping. - * \param obj_list: List with objects to snap (created in `create_object_list`). + * \param params: Snapping behavior. * * Read/Write Args * --------------- @@ -3205,7 +3200,7 @@ short ED_transform_snap_object_project_view3d_ex(SnapObjectContext *sctx, * \param mval: Screenspace coordinate. * \param prev_co: Coordinate for perpendicular point calculation (optional). * \param dist_px: Maximum distance to snap (in pixels). - * \param r_co: hit location. + * \param r_loc: hit location. * \param r_no: hit normal (optional). * \return Snap success */ |