[Bf-blender-cvs] [d5ac5e7e36b] temp-sculpt-cavity-mask: temp-sculpt-cavity-mask: Fix compile error
Joseph Eagar
noreply at git.blender.org
Sat Aug 6 00:29:42 CEST 2022
Commit: d5ac5e7e36b7524d585cb7f621c551125255b9dc
Author: Joseph Eagar
Date: Wed Aug 3 12:57:41 2022 -0700
Branches: temp-sculpt-cavity-mask
https://developer.blender.org/rBd5ac5e7e36b7524d585cb7f621c551125255b9dc
temp-sculpt-cavity-mask: Fix compile error
===================================================================
M source/blender/editors/sculpt_paint/sculpt_automasking.cc
M source/blender/editors/sculpt_paint/sculpt_paint_color.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.cc b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
index 90631ce83e1..07a159f7945 100644
--- a/source/blender/editors/sculpt_paint/sculpt_automasking.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
@@ -550,7 +550,7 @@ static void sculpt_cavity_automasking_init(Sculpt *sd, Object *ob, AutomaskingCa
int tot_vert = SCULPT_vertex_count_get(ss);
if (!ss->cavity) {
- ss->cavity = static_cast<float *>(
+ ss->cavity = static_cast<CavityMaskData *>(
MEM_malloc_arrayN(tot_vert, sizeof(CavityMaskData), __func__));
for (int i = 0; i < tot_vert; i++) {
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.c b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
index 4a3f189c68d..76e0fe6a6a9 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_color.c
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
@@ -177,7 +177,7 @@ static void do_paint_brush_task_cb_ex(void *__restrict userdata,
/* Final mix over the original color using brush alpha. We apply automaking again
* at this point to avoid washing out non-binary masking modes like cavity masking.
*/
- float automasking = SCULPT_automasking_factor_get(ss->cache->automasking, ss, vd.index);
+ float automasking = SCULPT_automasking_factor_get(ss->cache->automasking, ss, vd.vertex);
mul_v4_v4fl(buffer_color, color_buffer->color[vd.i], brush->alpha * automasking);
float col[4];
More information about the Bf-blender-cvs
mailing list