diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-14 19:57:52 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-14 19:57:52 +0300 |
commit | ea5bfedb4925485192e40cab98f2d5f1d3fe5012 (patch) | |
tree | dc1acc6668f86e9a439eea673a76b4f387400c4d /source/blender/editors/sculpt_paint | |
parent | e1c8ef551fe2c4393d714822e5e74eb153fc7af2 (diff) |
Cleanup: Further use of const for retrieved custom data layers
Similar to cf69652618fefcd22b2cde9a2.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_ops.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 2fd8bc1ba3f..95a7c1d8dee 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -4084,7 +4084,7 @@ typedef struct { static void proj_paint_layer_clone_init(ProjPaintState *ps, ProjPaintLayerClone *layer_clone) { - MLoopUV *mloopuv_clone_base = NULL; + const MLoopUV *mloopuv_clone_base = NULL; /* use clone mtface? */ if (ps->do_layer_clone) { diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.c b/source/blender/editors/sculpt_paint/sculpt_ops.c index 9c4ae446125..8803c95aab1 100644 --- a/source/blender/editors/sculpt_paint/sculpt_ops.c +++ b/source/blender/editors/sculpt_paint/sculpt_ops.c @@ -637,7 +637,7 @@ static int vertex_to_loop_colors_exec(bContext *C, wmOperator *UNUSED(op)) if (MPropCol_layer_n == -1) { return OPERATOR_CANCELLED; } - MPropCol *vertcols = CustomData_get_layer_n(&mesh->vdata, CD_PROP_COLOR, MPropCol_layer_n); + const MPropCol *vertcols = CustomData_get_layer_n(&mesh->vdata, CD_PROP_COLOR, MPropCol_layer_n); const MLoop *loops = CustomData_get_layer(&mesh->ldata, CD_MLOOP); const MPoly *polys = CustomData_get_layer(&mesh->pdata, CD_MPOLY); @@ -711,7 +711,8 @@ static int loop_to_vertex_colors_exec(bContext *C, wmOperator *UNUSED(op)) if (mloopcol_layer_n == -1) { return OPERATOR_CANCELLED; } - MLoopCol *loopcols = CustomData_get_layer_n(&mesh->ldata, CD_PROP_BYTE_COLOR, mloopcol_layer_n); + const MLoopCol *loopcols = CustomData_get_layer_n( + &mesh->ldata, CD_PROP_BYTE_COLOR, mloopcol_layer_n); const int MPropCol_layer_n = CustomData_get_active_layer(&mesh->vdata, CD_PROP_COLOR); if (MPropCol_layer_n == -1) { |