diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint')
5 files changed, 25 insertions, 15 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 9464bdb901e..5c83bdf0012 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -869,15 +869,19 @@ static bool paint_draw_alpha_overlay(UnifiedPaintSettings *ups, return alpha_overlay_active; } -BLI_INLINE void draw_tri_point( - unsigned int pos, float sel_col[4], float pivot_col[4], float *co, float width, bool selected) +BLI_INLINE void draw_tri_point(unsigned int pos, + const float sel_col[4], + float pivot_col[4], + float *co, + float width, + bool selected) { immUniformColor4fv(selected ? sel_col : pivot_col); GPU_line_width(3.0f); float w = width / 2.0f; - float tri[3][2] = { + const float tri[3][2] = { {co[0], co[1] + w}, {co[0] - w, co[1] - w}, {co[0] + w, co[1] - w}, @@ -899,8 +903,12 @@ BLI_INLINE void draw_tri_point( immEnd(); } -BLI_INLINE void draw_rect_point( - unsigned int pos, float sel_col[4], float handle_col[4], float *co, float width, bool selected) +BLI_INLINE void draw_rect_point(unsigned int pos, + const float sel_col[4], + float handle_col[4], + float *co, + float width, + bool selected) { immUniformColor4fv(selected ? sel_col : handle_col); @@ -1087,8 +1095,8 @@ static bool ommit_cursor_drawing(Paint *paint, ePaintMode mode, Brush *brush) static void cursor_draw_point_screen_space(const uint gpuattr, const ARegion *ar, - float true_location[3], - float obmat[4][4]) + const float true_location[3], + const float obmat[4][4]) { float translation_vertex_cursor[3], location[3]; copy_v3_v3(location, true_location); @@ -1100,7 +1108,7 @@ static void cursor_draw_point_screen_space(const uint gpuattr, static void cursor_draw_tiling_preview(const uint gpuattr, const ARegion *ar, - float true_location[3], + const float true_location[3], Sculpt *sd, Object *ob, float radius) diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 397b2981ace..04a54ad5137 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -5212,8 +5212,10 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), float line_len_sq_inv, line_len; float f; float color_f[4]; - float p[2] = {projPixel->projCoSS[0] - lastpos[0], - projPixel->projCoSS[1] - lastpos[1]}; + const float p[2] = { + projPixel->projCoSS[0] - lastpos[0], + projPixel->projCoSS[1] - lastpos[1], + }; sub_v2_v2v2(tangent, pos, lastpos); line_len = len_squared_v2(tangent); diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 6919536043f..6459325e6ee 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -251,7 +251,7 @@ static void imapaint_project(float matrix[4][4], const float co[3], float pco[4] } static void imapaint_tri_weights(float matrix[4][4], - GLint view[4], + const GLint view[4], const float v1[3], const float v2[3], const float v3[3], diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index fd45d1a17bc..351e4c0482b 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -444,7 +444,7 @@ static bool is_symmetry_iteration_valid(char i, char symm) /* Checks if a vertex is inside the brush radius from any of its mirrored axis */ static bool sculpt_is_vertex_inside_brush_radius_symm(float vertex[3], - float br_co[3], + const float br_co[3], float radius, char symm) { @@ -3594,7 +3594,7 @@ static void pose_brush_init_task_cb_ex(void *__restrict userdata, } static bool sculpt_pose_brush_is_vertex_inside_brush_radius(float vertex[3], - float br_co[3], + const float br_co[3], float radius, char symm) { diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index 251dddf6d78..de03fea7bb1 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -147,7 +147,7 @@ typedef struct Temp_UvData { static void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, - float mouse_coord[2], + const float mouse_coord[2], float alpha, float radius, float aspectRatio) @@ -235,7 +235,7 @@ static void HC_relaxation_iteration_uv(BMEditMesh *em, static void laplacian_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, - float mouse_coord[2], + const float mouse_coord[2], float alpha, float radius, float aspectRatio) |