Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenkernel / intern / dynamicpaint.c
index fce4620294d09aca9bf55f9df501fe8bab2d525f..1e8d0f0d767a56b3b17aa1cec8047e68f77f436b 100644 (file)
@@ -3739,7 +3739,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
 
                /* velocity brush, only do on main sample */
                if (brush->flags & MOD_DPAINT_USES_VELOCITY && ss == 0 && brushVelocity) {
-                       float weights[4];
+                       float weights[3];
                        float brushPointVelocity[3];
                        float velocity[3];
 
@@ -3748,7 +3748,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
                        const int v3 = mloop[mlooptri[hitTri].tri[2]].v;
 
                        /* calculate barycentric weights for hit point */
-                       interp_weights_face_v3(weights, mvert[v1].co, mvert[v2].co, mvert[v3].co, NULL, hitCoord);
+                       interp_weights_tri_v3(weights, mvert[v1].co, mvert[v2].co, mvert[v3].co, hitCoord);
 
                        /* simple check based on brush surface velocity,
                         *  todo: perhaps implement something that handles volume movement as well */