From 61776befc3f88c373e47ccbdf8c75e2ca0f4e987 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 9 Dec 2021 00:55:11 +1100 Subject: Cleanup: move public doc-strings into headers for 'editors' Ref T92709 --- source/blender/editors/sculpt_paint/paint_cursor.c | 1 - .../editors/sculpt_paint/paint_curve_undo.c | 1 - source/blender/editors/sculpt_paint/paint_image.c | 6 - .../blender/editors/sculpt_paint/paint_image_2d.c | 1 - .../editors/sculpt_paint/paint_image_proj.c | 2 - source/blender/editors/sculpt_paint/paint_intern.h | 69 ++++++++- source/blender/editors/sculpt_paint/paint_stroke.c | 4 - source/blender/editors/sculpt_paint/paint_utils.c | 8 -- source/blender/editors/sculpt_paint/paint_vertex.c | 1 - .../sculpt_paint/paint_vertex_color_utils.c | 6 - .../editors/sculpt_paint/paint_vertex_weight_ops.c | 5 +- .../sculpt_paint/paint_vertex_weight_utils.c | 10 -- source/blender/editors/sculpt_paint/sculpt.c | 52 ------- .../blender/editors/sculpt_paint/sculpt_boundary.c | 3 - source/blender/editors/sculpt_paint/sculpt_cloth.c | 3 - .../blender/editors/sculpt_paint/sculpt_face_set.c | 1 + .../editors/sculpt_paint/sculpt_filter_mesh.c | 1 - .../blender/editors/sculpt_paint/sculpt_intern.h | 156 +++++++++++++++++++-- .../sculpt_paint/sculpt_multiplane_scrape.c | 1 - source/blender/editors/sculpt_paint/sculpt_pose.c | 8 -- .../blender/editors/sculpt_paint/sculpt_smooth.c | 2 - source/blender/editors/sculpt_paint/sculpt_undo.c | 1 - 22 files changed, 213 insertions(+), 129 deletions(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index dafc7f45e2e..265746e27cd 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -98,7 +98,6 @@ static TexSnapshot primary_snap = {0}; static TexSnapshot secondary_snap = {0}; static CursorSnapshot cursor_snap = {0}; -/* Delete overlay cursor textures to preserve memory and invalidate all overlay flags. */ void paint_cursor_delete_textures(void) { if (primary_snap.overlay_texture) { diff --git a/source/blender/editors/sculpt_paint/paint_curve_undo.c b/source/blender/editors/sculpt_paint/paint_curve_undo.c index dbe522bf304..0b59e519f70 100644 --- a/source/blender/editors/sculpt_paint/paint_curve_undo.c +++ b/source/blender/editors/sculpt_paint/paint_curve_undo.c @@ -147,7 +147,6 @@ static void paintcurve_undosys_foreach_ID_ref(UndoStep *us_p, foreach_ID_ref_fn(user_data, ((UndoRefID *)&us->pc_ref)); } -/* Export for ED_undo_sys. */ void ED_paintcurve_undosys_type(UndoType *ut) { ut->name = "Paint Curve"; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index ab868df770d..dc2eaacca0c 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -181,7 +181,6 @@ void imapaint_image_update( } } -/* paint blur kernels. Projective painting enforces use of a 2x2 kernel due to lagging */ BlurKernel *paint_new_blur_kernel(Brush *br, bool proj) { int i, j; @@ -793,11 +792,6 @@ static void toggle_paint_cursor(Scene *scene, bool enable) } } -/* enable the paint cursor if it isn't already. - * - * purpose is to make sure the paint cursor is shown if paint - * mode is enabled in the image editor. the paint poll will - * ensure that the cursor is hidden when not in paint mode */ void ED_space_image_paint_update(Main *bmain, wmWindowManager *wm, Scene *scene) { ToolSettings *settings = scene->toolsettings; diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 7191431cf4c..4c54d3b3b5e 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -1777,7 +1777,6 @@ static ImageUser *paint_2d_get_tile_iuser(ImagePaintState *s, int tile_number) return iuser; } -/* this function expects linear space color values */ void paint_2d_bucket_fill(const bContext *C, const float color[3], Brush *br, diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 3e5d8e812d2..7df5848e068 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -6324,8 +6324,6 @@ void ED_paint_data_warning(struct ReportList *reports, bool uvs, bool mat, bool !stencil ? " Stencil," : ""); } -/* Make sure that active object has a material, - * and assign UVs and image layers if they do not exist */ bool ED_paint_proj_mesh_data_check( Scene *scene, Object *ob, bool *uvs, bool *mat, bool *tex, bool *stencil) { diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h index d1bcf87e871..90887b9fc39 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.h +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -59,6 +59,7 @@ typedef struct CoNo { } CoNo; /* paint_stroke.c */ + typedef bool (*StrokeGetLocation)(struct bContext *C, float location[3], const float mouse[2]); typedef bool (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, const float mouse[2]); typedef void (*StrokeUpdateStep)(struct bContext *C, @@ -77,13 +78,25 @@ struct PaintStroke *paint_stroke_new(struct bContext *C, int event_type); void paint_stroke_free(struct bContext *C, struct wmOperator *op); +/** + * Returns zero if the stroke dots should not be spaced, non-zero otherwise. + */ bool paint_space_stroke_enabled(struct Brush *br, enum ePaintMode mode); +/** + * Return true if the brush size can change during paint (normally used for pressure). + */ bool paint_supports_dynamic_size(struct Brush *br, enum ePaintMode mode); +/** + * Return true if the brush size can change during paint (normally used for pressure). + */ bool paint_supports_dynamic_tex_coords(struct Brush *br, enum ePaintMode mode); bool paint_supports_smooth_stroke(struct Brush *br, enum ePaintMode mode); bool paint_supports_texture(enum ePaintMode mode); bool paint_supports_jitter(enum ePaintMode mode); +/** + * Called in paint_ops.c, on each regeneration of key-maps. + */ struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf); int paint_stroke_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int paint_stroke_exec(struct bContext *C, struct wmOperator *op); @@ -96,14 +109,21 @@ float paint_stroke_distance_get(struct PaintStroke *stroke); void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data); bool PAINT_brush_tool_poll(struct bContext *C); void paint_cursor_start(struct Paint *p, bool (*poll)(struct bContext *C)); +/** + * Delete overlay cursor textures to preserve memory and invalidate all overlay flags. + */ void paint_cursor_delete_textures(void); /* paint_vertex.c */ + bool weight_paint_poll(struct bContext *C); bool weight_paint_poll_ignore_tool(bContext *C); bool weight_paint_mode_poll(struct bContext *C); bool vertex_paint_poll(struct bContext *C); bool vertex_paint_poll_ignore_tool(struct bContext *C); +/** + * Returns true if vertex paint mode is active. + */ bool vertex_paint_mode_poll(struct bContext *C); typedef void (*VPaintTransform_Callback)(const float col[3], @@ -126,15 +146,31 @@ void PAINT_OT_vertex_paint(struct wmOperatorType *ot); unsigned int vpaint_get_current_col(struct Scene *scene, struct VPaint *vp, bool secondary); /* paint_vertex_color_utils.c */ + +/** + * \note weight-paint has an equivalent function: #ED_wpaint_blend_tool + */ unsigned int ED_vpaint_blend_tool(const int tool, const uint col, const uint paintcol, const int alpha_i); +/** + * Apply callback to each vertex of the active vertex color layer. + */ bool ED_vpaint_color_transform(struct Object *ob, VPaintTransform_Callback vpaint_tx_fn, const void *user_data); /* paint_vertex_weight_utils.c */ + +/** + * \param weight: Typically the current weight: #MDeformWeight.weight + * + * \return The final weight, note that this is _not_ clamped from [0-1]. + * Clamping must be done on the final #MDeformWeight.weight + * + * \note vertex-paint has an equivalent function: #ED_vpaint_blend_tool + */ float ED_wpaint_blend_tool(const int tool, const float weight, const float paintval, @@ -147,13 +183,18 @@ struct WPaintVGroupIndex { int active; int mirror; }; +/** + * Ensure we have data on wpaint start, add if needed. + */ bool ED_wpaint_ensure_data(struct bContext *C, struct ReportList *reports, enum eWPaintFlag flag, struct WPaintVGroupIndex *vgroup_index); +/** Return -1 when invalid. */ int ED_wpaint_mirror_vgroup_ensure(struct Object *ob, const int vgroup_active); /* paint_vertex_color_ops.c */ + void PAINT_OT_vertex_color_set(struct wmOperatorType *ot); void PAINT_OT_vertex_color_from_weight(struct wmOperatorType *ot); void PAINT_OT_vertex_color_smooth(struct wmOperatorType *ot); @@ -163,6 +204,7 @@ void PAINT_OT_vertex_color_invert(struct wmOperatorType *ot); void PAINT_OT_vertex_color_levels(struct wmOperatorType *ot); /* paint_vertex_weight_ops.c */ + void PAINT_OT_weight_from_bones(struct wmOperatorType *ot); void PAINT_OT_weight_sample(struct wmOperatorType *ot); void PAINT_OT_weight_sample_group(struct wmOperatorType *ot); @@ -206,6 +248,9 @@ void paint_2d_stroke(void *ps, float pressure, float distance, float size); +/** + * This function expects linear space color values. + */ void paint_2d_bucket_fill(const struct bContext *C, const float color[3], struct Brush *br, @@ -291,13 +336,16 @@ void paint_curve_mask_cache_update(CurveMaskCache *curve_mask_cache, const float cursor_position[2]); /* sculpt_uv.c */ + void SCULPT_OT_uv_sculpt_stroke(struct wmOperatorType *ot); /* paint_utils.c */ -/* Convert the object-space axis-aligned bounding box (expressed as +/** + * Convert the object-space axis-aligned bounding box (expressed as * its minimum and maximum corners) into a screen-space rectangle, - * returns zero if the result is empty */ + * returns zero if the result is empty. + */ bool paint_convert_bb_to_rect(struct rcti *rect, const float bb_min[3], const float bb_max[3], @@ -305,9 +353,11 @@ bool paint_convert_bb_to_rect(struct rcti *rect, struct RegionView3D *rv3d, struct Object *ob); -/* Get four planes in object-space that describe the projection of +/** + * Get four planes in object-space that describe the projection of * screen_rect from screen into object-space (essentially converting a - * 2D screens-space bounding box into four 3D planes) */ + * 2D screens-space bounding box into four 3D planes). + */ void paint_calc_redraw_planes(float planes[4][4], const struct ARegion *region, struct Object *ob, @@ -327,6 +377,9 @@ void paint_get_tex_pixel_col(const struct MTex *mtex, bool convert, struct ColorSpace *colorspace); +/** + * Used for both 3D view and image window. + */ void paint_sample_color( struct bContext *C, struct ARegion *region, int x, int y, bool texpaint_proj, bool palette); @@ -348,6 +401,9 @@ bool mask_paint_poll(struct bContext *C); bool paint_curve_poll(struct bContext *C); bool facemask_paint_poll(struct bContext *C); +/** + * Uses symm to selectively flip any axis of a coordinate. + */ void flip_v3_v3(float out[3], const float in[3], const enum ePaintSymmetryFlags symm); void flip_qt_qt(float out[4], const float in[4], const enum ePaintSymmetryFlags symm); @@ -405,7 +461,10 @@ typedef struct { } BlurKernel; enum eBlurKernelType; -/* can be extended to other blur kernels later */ +/** + * Paint blur kernels. Projective painting enforces use of a 2x2 kernel due to lagging. + * Can be extended to other blur kernels later, + */ BlurKernel *paint_new_blur_kernel(struct Brush *br, bool proj); void paint_delete_blur_kernel(BlurKernel *); diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index de01bc3a474..c87f4e0aeec 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -1007,7 +1007,6 @@ static void stroke_done(bContext *C, wmOperator *op) paint_stroke_free(C, op); } -/* Returns zero if the stroke dots should not be spaced, non-zero otherwise */ bool paint_space_stroke_enabled(Brush *br, ePaintMode mode) { if ((br->flag & BRUSH_SPACE) == 0) { @@ -1041,7 +1040,6 @@ static bool sculpt_is_grab_tool(Brush *br) SCULPT_TOOL_SNAKE_HOOK); } -/* return true if the brush size can change during paint (normally used for pressure) */ bool paint_supports_dynamic_size(Brush *br, ePaintMode mode) { if (br->flag & BRUSH_ANCHORED) { @@ -1094,7 +1092,6 @@ bool paint_supports_texture(ePaintMode mode) mode, PAINT_MODE_SCULPT, PAINT_MODE_VERTEX, PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D); } -/* return true if the brush size can change during paint (normally used for pressure) */ bool paint_supports_dynamic_tex_coords(Brush *br, ePaintMode mode) { if (br->flag & BRUSH_ANCHORED) { @@ -1115,7 +1112,6 @@ bool paint_supports_dynamic_tex_coords(Brush *br, ePaintMode mode) #define PAINT_STROKE_MODAL_CANCEL 1 -/* Called in paint_ops.c, on each regeneration of key-maps. */ struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf) { static struct EnumPropertyItem modal_items[] = { diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 709e04d807d..541893f7957 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -80,9 +80,6 @@ #include "paint_intern.h" -/* Convert the object-space axis-aligned bounding box (expressed as - * its minimum and maximum corners) into a screen-space rectangle, - * returns zero if the result is empty */ bool paint_convert_bb_to_rect(rcti *rect, const float bb_min[3], const float bb_max[3], @@ -127,9 +124,6 @@ bool paint_convert_bb_to_rect(rcti *rect, return rect->xmin < rect->xmax && rect->ymin < rect->ymax; } -/* Get four planes in object-space that describe the projection of - * screen_rect from screen into object-space (essentially converting a - * 2D screens-space bounding box into four 3D planes) */ void paint_calc_redraw_planes(float planes[4][4], const ARegion *region, Object *ob, @@ -403,7 +397,6 @@ static Image *imapaint_face_image(Object *ob, Mesh *me, int face_index) return ima; } -/* Uses symm to selectively flip any axis of a coordinate. */ void flip_v3_v3(float out[3], const float in[3], const ePaintSymmetryFlags symm) { if (symm & PAINT_SYMM_X) { @@ -449,7 +442,6 @@ void flip_qt_qt(float out[4], const float in[4], const ePaintSymmetryFlags symm) axis_angle_normalized_to_quat(out, axis, angle); } -/* used for both 3d view and image window */ void paint_sample_color( bContext *C, ARegion *region, int x, int y, bool texpaint_proj, bool use_palette) { diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index fede01a614b..302de13a881 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -201,7 +201,6 @@ static void paint_last_stroke_update(Scene *scene, const float location[3]) /* polling - retrieve whether cursor should be set or operator should be done */ -/* Returns true if vertex paint mode is active */ bool vertex_paint_mode_poll(bContext *C) { Object *ob = CTX_data_active_object(C); diff --git a/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c b/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c index dbc6044d2d8..a083af14c89 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c @@ -41,9 +41,6 @@ #define EPS_SATURATION 0.0005f -/** - * Apply callback to each vertex of the active vertex color layer. - */ bool ED_vpaint_color_transform(struct Object *ob, VPaintTransform_Callback vpaint_tx_fn, const void *user_data) @@ -610,9 +607,6 @@ BLI_INLINE uint mcol_alpha_sub(uint col_src, int fac) return col_mix; } -/** - * \note weight-paint has an equivalent function: #ED_wpaint_blend_tool - */ uint ED_vpaint_blend_tool(const int tool, const uint col, const uint paintcol, const int alpha_i) { switch ((IMB_BlendMode)tool) { diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c index 1077f66f10c..d10a56be866 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c @@ -408,10 +408,11 @@ static int weight_sample_group_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -/* TODO: we could make this a menu into OBJECT_OT_vertex_group_set_active - * rather than its own operator */ void PAINT_OT_weight_sample_group(wmOperatorType *ot) { + /* TODO: we could make this a menu into #OBJECT_OT_vertex_group_set_active + * rather than its own operator */ + PropertyRNA *prop = NULL; /* identifiers */ diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c index 19ffa0c952d..63a70baeaad 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c @@ -51,7 +51,6 @@ /** \name Weight Paint Sanity Checks * \{ */ -/* ensure we have data on wpaint start, add if needed */ bool ED_wpaint_ensure_data(bContext *C, struct ReportList *reports, enum eWPaintFlag flag, @@ -133,7 +132,6 @@ bool ED_wpaint_ensure_data(bContext *C, } /** \} */ -/* mirror_vgroup is set to -1 when invalid */ int ED_wpaint_mirror_vgroup_ensure(Object *ob, const int vgroup_active) { const ListBase *defbase = BKE_object_defgroup_list(ob); @@ -277,14 +275,6 @@ BLI_INLINE float wval_exclusion(float weight, float paintval, float fac) return temp * fac + weight * mfac; } -/** - * \param weight: Typically the current weight: #MDeformWeight.weight - * - * \return The final weight, note that this is _not_ clamped from [0-1]. - * Clamping must be done on the final #MDeformWeight.weight - * - * \note vertex-paint has an equivalent function: #ED_vpaint_blend_tool - */ float ED_wpaint_blend_tool(const int tool, const float weight, const float paintval, diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 7b854e886a0..5e34c526d47 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -911,32 +911,18 @@ bool SCULPT_vertex_is_boundary(const SculptSession *ss, const int index) /* Utilities */ -/** - * Returns true when the step belongs to the stroke that is directly performed by the brush and - * not by one of the symmetry passes. - */ bool SCULPT_stroke_is_main_symmetry_pass(StrokeCache *cache) { return cache->mirror_symmetry_pass == 0 && cache->radial_symmetry_pass == 0 && cache->tile_pass == 0; } -/** - * Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes - * enabled. - * - * This should be used for functionality that needs to be computed once per stroke of a particular - * tool (allocating memory, updating random seeds...). - */ bool SCULPT_stroke_is_first_brush_step(StrokeCache *cache) { return cache->first_time && cache->mirror_symmetry_pass == 0 && cache->radial_symmetry_pass == 0 && cache->tile_pass == 0; } -/** - * Returns true on the first brush step of each symmetry pass. - */ bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(StrokeCache *cache) { return cache->first_time; @@ -1049,7 +1035,6 @@ bool SCULPT_is_symmetry_iteration_valid(char i, char symm) return i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (!ELEM(i, 3, 5)))); } -/* Checks if a vertex is inside the brush radius from any of its mirrored axis. */ bool SCULPT_is_vertex_inside_brush_radius_symm(const float vertex[3], const float br_co[3], float radius, @@ -1274,10 +1259,6 @@ typedef enum StrokeFlags { CLIP_Z = 4, } StrokeFlags; -/** - * Initialize a #SculptOrigVertData for accessing original vertex data; - * handles #BMesh, #Mesh, and multi-resolution. - */ void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, Object *ob, SculptUndoNode *unode) { SculptSession *ss = ob->sculpt; @@ -1297,10 +1278,6 @@ void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, Object *ob, Scul } } -/** - * Initialize a #SculptOrigVertData for accessing original vertex data; - * handles #BMesh, #Mesh, and multi-resolution. - */ void SCULPT_orig_vert_data_init(SculptOrigVertData *data, Object *ob, PBVHNode *node) { SculptUndoNode *unode; @@ -1308,9 +1285,6 @@ void SCULPT_orig_vert_data_init(SculptOrigVertData *data, Object *ob, PBVHNode * SCULPT_orig_vert_data_unode_init(data, ob, unode); } -/** - * Update a #SculptOrigVertData for a particular vertex from the PBVH iterator. - */ void SCULPT_orig_vert_data_update(SculptOrigVertData *orig_data, PBVHVertexIter *iter) { if (orig_data->unode->type == SCULPT_UNDO_COORDS) { @@ -1443,12 +1417,6 @@ static void sculpt_project_v3(const SculptProjectVector *spvc, const float vec[3 /**********************************************************************/ -/* Returns true if the stroke will use dynamic topology, false - * otherwise. - * - * Factors: some brushes like grab cannot do dynamic topology. - * Others, like smooth, are better without. - * Same goes for alt-key smoothing. */ bool SCULPT_stroke_is_dynamic_topology(const SculptSession *ss, const Brush *brush) { return ((BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) && @@ -1573,7 +1541,6 @@ static void sculpt_extend_redraw_rect_previous(Object *ob, rcti *rect) BLI_rcti_union(rect, &ss->cache->previous_r); } -/* Get a screen-space rectangle of the modified area. */ bool SCULPT_get_redraw_rect(ARegion *region, RegionView3D *rv3d, Object *ob, rcti *rect) { PBVH *pbvh = ob->sculpt->pbvh; @@ -2205,7 +2172,6 @@ void SCULPT_calc_area_normal( SCULPT_pbvh_calc_area_normal(brush, ob, nodes, totnode, true, r_area_no); } -/* Expose 'calc_area_normal' externally. */ bool SCULPT_pbvh_calc_area_normal(const Brush *brush, Object *ob, PBVHNode **nodes, @@ -2463,7 +2429,6 @@ static float brush_strength(const Sculpt *sd, } } -/* Return a multiplier for brush strength on a particular vertex. */ float SCULPT_brush_strength_factor(SculptSession *ss, const Brush *br, const float brush_point[3], @@ -2561,7 +2526,6 @@ float SCULPT_brush_strength_factor(SculptSession *ss, return avg; } -/* Test AABB against sphere. */ bool SCULPT_search_sphere_cb(PBVHNode *node, void *data_v) { SculptSearchSphereData *data = data_v; @@ -2608,7 +2572,6 @@ bool SCULPT_search_sphere_cb(PBVHNode *node, void *data_v) return len_squared_v3(t) < data->radius_squared; } -/* 2D projection (distance to line). */ bool SCULPT_search_circle_cb(PBVHNode *node, void *data_v) { SculptSearchCircleData *data = data_v; @@ -2636,9 +2599,6 @@ bool SCULPT_search_circle_cb(PBVHNode *node, void *data_v) return dist_sq < data->radius_squared || true; } -/** - * Handles clipping against a mirror modifier and #SCULPT_LOCK_X/Y/Z axis flags. - */ void SCULPT_clip(Sculpt *sd, SculptSession *ss, float co[3], const float val[3]) { for (int i = 0; i < 3; i++) { @@ -6318,7 +6278,6 @@ static void SCULPT_flush_stroke_deform_task_cb(void *__restrict userdata, BKE_pbvh_vertex_iter_end; } -/* Flush displacement from deformed PBVH to original layer. */ void SCULPT_flush_stroke_deform(Sculpt *sd, Object *ob, bool is_proxy_used) { SculptSession *ss = ob->sculpt; @@ -6372,10 +6331,6 @@ void SCULPT_flush_stroke_deform(Sculpt *sd, Object *ob, bool is_proxy_used) } } -/** - * Flip all the edit-data across the axis/axes specified by \a symm. - * Used to calculate multiple modifications to the mesh when symmetry is enabled. - */ void SCULPT_cache_calc_brushdata_symm(StrokeCache *cache, const char symm, const char axis, @@ -7416,9 +7371,6 @@ float SCULPT_raycast_init(ViewContext *vc, return dist; } -/* Gets the normal, location and active vertex location of the geometry under the cursor. This also - * updates the active vertex and cursor related data of the SculptSession using the mouse position - */ bool SCULPT_cursor_geometry_info_update(bContext *C, SculptCursorGeometryInfo *out, const float mouse[2], @@ -7548,9 +7500,6 @@ bool SCULPT_cursor_geometry_info_update(bContext *C, return true; } -/* Do a raycast in the tree to find the 3d brush location - * (This allows us to ignore the GL depth buffer) - * Returns 0 if the ray doesn't hit the mesh, non-zero otherwise. */ bool SCULPT_stroke_get_location(bContext *C, float out[3], const float mouse[2]) { Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); @@ -7714,7 +7663,6 @@ static void sculpt_restore_mesh(Sculpt *sd, Object *ob) } } -/* Copy the PBVH bounding box into the object's bounding box. */ void SCULPT_update_object_bounding_box(Object *ob) { if (ob->runtime.bb) { diff --git a/source/blender/editors/sculpt_paint/sculpt_boundary.c b/source/blender/editors/sculpt_paint/sculpt_boundary.c index 37678ec276a..e238fafb063 100644 --- a/source/blender/editors/sculpt_paint/sculpt_boundary.c +++ b/source/blender/editors/sculpt_paint/sculpt_boundary.c @@ -487,8 +487,6 @@ static void sculpt_boundary_falloff_factor_init(SculptSession *ss, } } -/* Main function to get SculptBoundary data both for brush deformation and viewport preview. Can - * return NULL if there is no boundary from the given vertex using the given radius. */ SculptBoundary *SCULPT_boundary_data_init(Object *object, Brush *brush, const int initial_vertex, @@ -946,7 +944,6 @@ static void do_boundary_brush_smooth_task_cb_ex(void *__restrict userdata, BKE_pbvh_vertex_iter_end; } -/* Main Brush Function. */ void SCULPT_do_boundary_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) { SculptSession *ss = ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c index fa879214794..dcfd7f7bcdc 100644 --- a/source/blender/editors/sculpt_paint/sculpt_cloth.c +++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c @@ -1052,7 +1052,6 @@ static void cloth_sim_initialize_default_node_state(SculptSession *ss, MEM_SAFE_FREE(nodes); } -/* Public functions. */ SculptClothSimulation *SCULPT_cloth_brush_simulation_create(SculptSession *ss, const float cloth_mass, const float cloth_damping, @@ -1195,7 +1194,6 @@ static void sculpt_cloth_ensure_constraints_in_simulation_area(Sculpt *sd, sd, ob, nodes, totnode, ss->cache->cloth_sim, sim_location, limit); } -/* Main Brush Function. */ void SCULPT_do_cloth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) { SculptSession *ss = ob->sculpt; @@ -1271,7 +1269,6 @@ void SCULPT_cloth_simulation_free(struct SculptClothSimulation *cloth_sim) MEM_SAFE_FREE(cloth_sim); } -/* Cursor drawing function. */ void SCULPT_cloth_simulation_limits_draw(const uint gpuattr, const Brush *brush, const float location[3], diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c index 89e07081802..dc8cda964ea 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.c +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c @@ -73,6 +73,7 @@ #include /* Utils. */ + int ED_sculpt_face_sets_find_next_available_id(struct Mesh *mesh) { int *face_sets = CustomData_get_layer(&mesh->pdata, CD_SCULPT_FACE_SETS); diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c index 760cf632ae9..ff1a8935ba0 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c @@ -64,7 +64,6 @@ #include #include -/* Filter orientation utils. */ void SCULPT_filter_to_orientation_space(float r_v[3], struct FilterCache *filter_cache) { switch (filter_cache->orientation) { diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 16df1efd969..4dd2a786922 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -46,7 +46,9 @@ enum ePaintSymmetryFlags; bool SCULPT_mode_poll(struct bContext *C); bool SCULPT_mode_poll_view3d(struct bContext *C); -/* checks for a brush, not just sculpt mode */ +/** + * Checks for a brush, not just sculpt mode. + */ bool SCULPT_poll(struct bContext *C); bool SCULPT_poll_view3d(struct bContext *C); @@ -63,9 +65,14 @@ typedef enum SculptUpdateType { void SCULPT_flush_update_step(bContext *C, SculptUpdateType update_flags); void SCULPT_flush_update_done(const bContext *C, Object *ob, SculptUpdateType update_flags); +/** + * Flush displacement from deformed PBVH to original layer. + */ void SCULPT_flush_stroke_deform(struct Sculpt *sd, Object *ob, bool is_proxy_used); -/* Should be used after modifying the mask or Face Sets IDs. */ +/** + * Should be used after modifying the mask or Face Sets IDs. + */ void SCULPT_tag_update_overlays(bContext *C); /* Stroke */ @@ -76,7 +83,16 @@ typedef struct SculptCursorGeometryInfo { float active_vertex_co[3]; } SculptCursorGeometryInfo; +/** + * Do a ray-cast in the tree to find the 3d brush location + * (This allows us to ignore the GL depth buffer) + * Returns 0 if the ray doesn't hit the mesh, non-zero otherwise. + */ bool SCULPT_stroke_get_location(struct bContext *C, float out[3], const float mouse[2]); +/** + * Gets the normal, location and active vertex location of the geometry under the cursor. This also + * updates the active vertex and cursor related data of the SculptSession using the mouse position + */ bool SCULPT_cursor_geometry_info_update(bContext *C, SculptCursorGeometryInfo *out, const float mouse[2], @@ -95,6 +111,7 @@ float SCULPT_raycast_init(struct ViewContext *vc, char SCULPT_mesh_symmetry_xyz_get(Object *object); /* Sculpt PBVH abstraction API */ + void SCULPT_vertex_random_access_ensure(struct SculptSession *ss); int SCULPT_vertex_count_get(struct SculptSession *ss); @@ -106,15 +123,21 @@ const float *SCULPT_vertex_color_get(SculptSession *ss, int index); const float *SCULPT_vertex_persistent_co_get(SculptSession *ss, int index); void SCULPT_vertex_persistent_normal_get(SculptSession *ss, int index, float no[3]); -/* Coordinates used for manipulating the base mesh when Grab Active Vertex is enabled. */ +/** + * Coordinates used for manipulating the base mesh when Grab Active Vertex is enabled. + */ const float *SCULPT_vertex_co_for_grab_active_get(SculptSession *ss, int index); -/* Returns the info of the limit surface when Multires is available, otherwise it returns the - * current coordinate of the vertex. */ +/** + * Returns the info of the limit surface when multi-res is available, + * otherwise it returns the current coordinate of the vertex. + */ void SCULPT_vertex_limit_surface_get(SculptSession *ss, int index, float r_co[3]); -/* Returns the pointer to the coordinates that should be edited from a brush tool iterator - * depending on the given deformation target. */ +/** + * Returns the pointer to the coordinates that should be edited from a brush tool iterator + * depending on the given deformation target. + */ float *SCULPT_brush_deform_target_vertex_co_get(SculptSession *ss, const int deform_target, PBVHVertexIter *iter); @@ -215,8 +238,22 @@ bool SCULPT_vertex_any_face_set_visible_get(SculptSession *ss, int index); void SCULPT_face_sets_visibility_invert(SculptSession *ss); void SCULPT_face_sets_visibility_all_set(SculptSession *ss, bool visible); +/** + * Returns true when the step belongs to the stroke that is directly performed by the brush and + * not by one of the symmetry passes. + */ bool SCULPT_stroke_is_main_symmetry_pass(struct StrokeCache *cache); +/** + * Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes + * enabled. + * + * This should be used for functionality that needs to be computed once per stroke of a particular + * tool (allocating memory, updating random seeds...). + */ bool SCULPT_stroke_is_first_brush_step(struct StrokeCache *cache); +/** + * Returns true on the first brush step of each symmetry pass. + */ bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(struct StrokeCache *cache); /* Sculpt Original Data */ @@ -236,8 +273,19 @@ typedef struct { const float *col; } SculptOrigVertData; +/** + * Initialize a #SculptOrigVertData for accessing original vertex data; + * handles #BMesh, #Mesh, and multi-resolution. + */ void SCULPT_orig_vert_data_init(SculptOrigVertData *data, Object *ob, PBVHNode *node); +/** + * Update a #SculptOrigVertData for a particular vertex from the PBVH iterator. + */ void SCULPT_orig_vert_data_update(SculptOrigVertData *orig_data, PBVHVertexIter *iter); +/** + * Initialize a #SculptOrigVertData for accessing original vertex data; + * handles #BMesh, #Mesh, and multi-resolution. + */ void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, Object *ob, struct SculptUndoNode *unode); @@ -263,12 +311,18 @@ int SCULPT_plane_point_side(const float co[3], const float plane[4]); int SCULPT_plane_trim(const struct StrokeCache *cache, const struct Brush *brush, const float val[3]); +/** + * Handles clipping against a mirror modifier and #SCULPT_LOCK_X/Y/Z axis flags. + */ void SCULPT_clip(Sculpt *sd, SculptSession *ss, float co[3], const float val[3]); float SCULPT_brush_plane_offset_get(Sculpt *sd, SculptSession *ss); ePaintSymmetryAreas SCULPT_get_vertex_symm_area(const float co[3]); bool SCULPT_check_vertex_pivot_symmetry(const float vco[3], const float pco[3], const char symm); +/** + * Checks if a vertex is inside the brush radius from any of its mirrored axis. + */ bool SCULPT_is_vertex_inside_brush_radius_symm(const float vertex[3], const float br_co[3], float radius, @@ -329,6 +383,14 @@ void sculpt_dynamic_topology_disable_with_undo(struct Main *bmain, Scene *scene, Object *ob); +/** + * Returns true if the stroke will use dynamic topology, false + * otherwise. + * + * Factors: some brushes like grab cannot do dynamic topology. + * Others, like smooth, are better without. + * Same goes for alt-key smoothing. + */ bool SCULPT_stroke_is_dynamic_topology(const SculptSession *ss, const Brush *brush); void SCULPT_dynamic_topology_triangulate(struct BMesh *bm); @@ -391,6 +453,10 @@ void SCULPT_mask_filter_smooth_apply( /* Brushes. */ /* Cloth Brush. */ + +/** + * Main Brush Function. + */ void SCULPT_do_cloth_brush(struct Sculpt *sd, struct Object *ob, struct PBVHNode **nodes, @@ -398,6 +464,8 @@ void SCULPT_do_cloth_brush(struct Sculpt *sd, void SCULPT_cloth_simulation_free(struct SculptClothSimulation *cloth_sim); +/* Public functions. */ + struct SculptClothSimulation *SCULPT_cloth_brush_simulation_create( struct SculptSession *ss, const float cloth_mass, @@ -429,6 +497,9 @@ void SCULPT_cloth_brush_ensure_nodes_constraints(struct Sculpt *sd, float initial_location[3], const float radius); +/** + * Cursor drawing function. + */ void SCULPT_cloth_simulation_limits_draw(const uint gpuattr, const struct Brush *brush, const float location[3], @@ -490,10 +561,21 @@ BLI_INLINE bool SCULPT_tool_needs_all_pbvh_nodes(const Brush *brush) } /* Pose Brush. */ + +/** + * Main Brush Function. + */ void SCULPT_do_pose_brush(struct Sculpt *sd, struct Object *ob, struct PBVHNode **nodes, int totnode); +/** + * Calculate the pose origin and (Optionally the pose factor) + * that is used when using the pose brush. + * + * \param r_pose_origin: Must be a valid pointer. + * \param r_pose_factor: Optional, when set to NULL it won't be calculated. + */ void SCULPT_pose_calc_pose_data(struct Sculpt *sd, struct Object *ob, struct SculptSession *ss, @@ -515,11 +597,17 @@ struct SculptPoseIKChain *SCULPT_pose_ik_chain_init(struct Sculpt *sd, void SCULPT_pose_ik_chain_free(struct SculptPoseIKChain *ik_chain); /* Boundary Brush. */ + +/** + * Main function to get #SculptBoundary data both for brush deformation and viewport preview. + * Can return NULL if there is no boundary from the given vertex using the given radius. + */ struct SculptBoundary *SCULPT_boundary_data_init(Object *object, Brush *brush, const int initial_vertex, const float radius); void SCULPT_boundary_data_free(struct SculptBoundary *boundary); +/* Main Brush Function. */ void SCULPT_do_boundary_brush(struct Sculpt *sd, struct Object *ob, struct PBVHNode **nodes, @@ -532,6 +620,7 @@ void SCULPT_boundary_edges_preview_draw(const uint gpuattr, void SCULPT_boundary_pivot_line_preview_draw(const uint gpuattr, struct SculptSession *ss); /* Multi-plane Scrape Brush. */ +/* Main Brush Function. */ void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode); void SCULPT_multiplane_scrape_preview_draw(const uint gpuattr, Brush *brush, @@ -548,13 +637,20 @@ void SCULPT_do_paint_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode void SCULPT_do_smear_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode); /* Smooth Brush. */ + +/** + * For bmesh: Average surrounding verts based on an orthogonality measure. + * Naturally converges to a quad-like structure. + */ void SCULPT_bmesh_four_neighbor_average(float avg[3], float direction[3], struct BMVert *v); void SCULPT_neighbor_coords_average(SculptSession *ss, float result[3], int index); float SCULPT_neighbor_mask_average(SculptSession *ss, int index); void SCULPT_neighbor_color_average(SculptSession *ss, float result[4], int index); -/* Mask the mesh boundaries smoothing only the mesh surface without using automasking. */ +/** + * Mask the mesh boundaries smoothing only the mesh surface without using auto-masking. + */ void SCULPT_neighbor_coords_average_interior(SculptSession *ss, float result[3], int index); void SCULPT_smooth(Sculpt *sd, @@ -852,7 +948,13 @@ bool SCULPT_brush_test_cube(SculptBrushTest *test, const float local[4][4], const float roundness); bool SCULPT_brush_test_circle_sq(SculptBrushTest *test, const float co[3]); +/** + * Test AABB against sphere. + */ bool SCULPT_search_sphere_cb(PBVHNode *node, void *data_v); +/** + * 2D projection (distance to line). + */ bool SCULPT_search_circle_cb(PBVHNode *node, void *data_v); SculptBrushTestFn SCULPT_brush_test_init_with_falloff_shape(SculptSession *ss, @@ -861,6 +963,9 @@ SculptBrushTestFn SCULPT_brush_test_init_with_falloff_shape(SculptSession *ss, const float *SCULPT_brush_frontface_normal_from_falloff_shape(SculptSession *ss, char falloff_shape); +/** + * Return a multiplier for brush strength on a particular vertex. + */ float SCULPT_brush_strength_factor(struct SculptSession *ss, const struct Brush *br, const float point[3], @@ -871,15 +976,21 @@ float SCULPT_brush_strength_factor(struct SculptSession *ss, const int vertex_index, const int thread_id); -/* Tilts a normal by the x and y tilt values using the view axis. */ +/** + * Tilts a normal by the x and y tilt values using the view axis. + */ void SCULPT_tilt_apply_to_normal(float r_normal[3], struct StrokeCache *cache, const float tilt_strength); -/* Get effective surface normal with pen tilt and tilt strength applied to it. */ +/** + * Get effective surface normal with pen tilt and tilt strength applied to it. + */ void SCULPT_tilt_effective_normal_get(const SculptSession *ss, const Brush *brush, float r_no[3]); -/* just for vertex paint. */ +/** + * Expose 'calc_area_normal' externally (just for vertex paint). + */ bool SCULPT_pbvh_calc_area_normal(const struct Brush *brush, Object *ob, PBVHNode **nodes, @@ -1085,6 +1196,7 @@ typedef enum SculptTransformDisplacementMode { SCULPT_TRANSFORM_DISPLACEMENT_INCREMENTAL = 1, } SculptTransformDisplacementMode; +/* Filter orientation utils. */ void SCULPT_filter_to_orientation_space(float r_v[3], struct FilterCache *filter_cache); void SCULPT_filter_to_object_space(float r_v[3], struct FilterCache *filter_cache); void SCULPT_filter_zero_disabled_axis_components(float r_v[3], struct FilterCache *filter_cache); @@ -1298,6 +1410,10 @@ typedef struct FilterCache { AutomaskingCache *automasking; } FilterCache; +/** + * Flip all the edit-data across the axis/axes specified by \a symm. + * Used to calculate multiple modifications to the mesh when symmetry is enabled. + */ void SCULPT_cache_calc_brushdata_symm(StrokeCache *cache, const char symm, const char axis, @@ -1313,8 +1429,14 @@ void SCULPT_undo_push_end_ex(const bool use_nested_undo); void SCULPT_vertcos_to_key(Object *ob, KeyBlock *kb, const float (*vertCos)[3]); +/** + * Copy the PBVH bounding box into the object's bounding box. + */ void SCULPT_update_object_bounding_box(struct Object *ob); +/** + * Get a screen-space rectangle of the modified area. + */ bool SCULPT_get_redraw_rect(struct ARegion *region, struct RegionView3D *rv3d, Object *ob, @@ -1323,10 +1445,12 @@ bool SCULPT_get_redraw_rect(struct ARegion *region, /* Operators. */ /* Expand. */ + void SCULPT_OT_expand(struct wmOperatorType *ot); void sculpt_expand_modal_keymap(struct wmKeyConfig *keyconf); /* Gestures. */ + void SCULPT_OT_face_set_lasso_gesture(struct wmOperatorType *ot); void SCULPT_OT_face_set_box_gesture(struct wmOperatorType *ot); @@ -1336,6 +1460,7 @@ void SCULPT_OT_trim_box_gesture(struct wmOperatorType *ot); void SCULPT_OT_project_line_gesture(struct wmOperatorType *ot); /* Face Sets. */ + void SCULPT_OT_face_sets_randomize_colors(struct wmOperatorType *ot); void SCULPT_OT_face_sets_change_visibility(struct wmOperatorType *ot); void SCULPT_OT_face_sets_init(struct wmOperatorType *ot); @@ -1343,32 +1468,41 @@ void SCULPT_OT_face_sets_create(struct wmOperatorType *ot); void SCULPT_OT_face_sets_edit(struct wmOperatorType *ot); /* Transform. */ + void SCULPT_OT_set_pivot_position(struct wmOperatorType *ot); /* Mesh Filter. */ + void SCULPT_OT_mesh_filter(struct wmOperatorType *ot); /* Cloth Filter. */ + void SCULPT_OT_cloth_filter(struct wmOperatorType *ot); /* Color Filter. */ + void SCULPT_OT_color_filter(struct wmOperatorType *ot); /* Mask filter and Dirty Mask. */ + void SCULPT_OT_mask_filter(struct wmOperatorType *ot); void SCULPT_OT_dirty_mask(struct wmOperatorType *ot); /* Mask and Face Sets Expand. */ + void SCULPT_OT_mask_expand(struct wmOperatorType *ot); /* Mask Init. */ + void SCULPT_OT_mask_init(struct wmOperatorType *ot); /* Detail size. */ + void SCULPT_OT_detail_flood_fill(struct wmOperatorType *ot); void SCULPT_OT_sample_detail_size(struct wmOperatorType *ot); void SCULPT_OT_set_detail_size(struct wmOperatorType *ot); void SCULPT_OT_dyntopo_detail_size_edit(struct wmOperatorType *ot); /* Dyntopo. */ + void SCULPT_OT_dynamic_topology_toggle(struct wmOperatorType *ot); diff --git a/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c b/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c index f78f30a2cfd..05db799cb00 100644 --- a/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c +++ b/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c @@ -229,7 +229,6 @@ static void do_multiplane_scrape_brush_task_cb_ex(void *__restrict userdata, /* Public functions. */ -/* Main Brush Function. */ void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) { SculptSession *ss = ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt_pose.c b/source/blender/editors/sculpt_paint/sculpt_pose.c index 587ce346428..3b939279bf9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_pose.c +++ b/source/blender/editors/sculpt_paint/sculpt_pose.c @@ -540,13 +540,6 @@ static bool pose_face_sets_floodfill_cb( /* Public functions. */ -/** - * Calculate the pose origin and (Optionally the pose factor) - * that is used when using the pose brush. - * - * \param r_pose_origin: Must be a valid pointer. - * \param r_pose_factor: Optional, when set to NULL it won't be calculated. - */ void SCULPT_pose_calc_pose_data(Sculpt *sd, Object *ob, SculptSession *ss, @@ -1132,7 +1125,6 @@ static void sculpt_pose_align_pivot_local_space(float r_mat[4][4], ortho_basis_v3v3_v3(r_mat[0], r_mat[1], r_mat[2]); } -/* Main Brush Function. */ void SCULPT_do_pose_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) { SculptSession *ss = ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt_smooth.c b/source/blender/editors/sculpt_paint/sculpt_smooth.c index 1bfe8e1cbf1..847f42fe9e8 100644 --- a/source/blender/editors/sculpt_paint/sculpt_smooth.c +++ b/source/blender/editors/sculpt_paint/sculpt_smooth.c @@ -102,8 +102,6 @@ void SCULPT_neighbor_coords_average_interior(SculptSession *ss, float result[3], mul_v3_v3fl(result, avg, 1.0f / total); } -/* For bmesh: Average surrounding verts based on an orthogonality measure. - * Naturally converges to a quad-like structure. */ void SCULPT_bmesh_four_neighbor_average(float avg[3], float direction[3], BMVert *v) { diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 501a1e53276..4a88b75cf25 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -1598,7 +1598,6 @@ void ED_sculpt_undo_geometry_end(struct Object *ob) SCULPT_undo_push_end(); } -/* Export for ED_undo_sys. */ void ED_sculpt_undosys_type(UndoType *ut) { ut->name = "Sculpt"; -- cgit v1.2.3