[Bf-blender-cvs] [1ccd92d0bb6] temp_bmesh_multires: commit prior to merge
Joseph Eagar
noreply at git.blender.org
Mon Mar 1 02:05:54 CET 2021
Commit: 1ccd92d0bb606569493daf4163a0001f7663ed32
Author: Joseph Eagar
Date: Sun Feb 28 04:23:45 2021 -0800
Branches: temp_bmesh_multires
https://developer.blender.org/rB1ccd92d0bb606569493daf4163a0001f7663ed32
commit prior to merge
===================================================================
M source/blender/blenkernel/BKE_mesh_mirror.h
M source/blender/blenkernel/intern/mesh_mirror.c
M source/blender/editors/sculpt_paint/sculpt_boundary.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_mesh_mirror.h b/source/blender/blenkernel/BKE_mesh_mirror.h
index a91f0787e68..2f792049a41 100644
--- a/source/blender/blenkernel/BKE_mesh_mirror.h
+++ b/source/blender/blenkernel/BKE_mesh_mirror.h
@@ -32,7 +32,7 @@ struct Mesh;
struct MirrorModifierData;
struct Object;
-struct Mesh *BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(struct MirrorModifierData *mmd,
+struct Mesh *BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(struct Object *ob, struct MirrorModifierData *mmd,
const struct Mesh *mesh,
int axis,
const float plane_co[3],
diff --git a/source/blender/blenkernel/intern/mesh_mirror.c b/source/blender/blenkernel/intern/mesh_mirror.c
index b45e01cb5a0..d796254f306 100644
--- a/source/blender/blenkernel/intern/mesh_mirror.c
+++ b/source/blender/blenkernel/intern/mesh_mirror.c
@@ -42,7 +42,7 @@
#include "MOD_modifiertypes.h"
Mesh *BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(Object *ob,
- MirrorModifierData *mmd,
+ MirrorModifierData *mmd,
const Mesh *mesh,
int axis,
const float plane_co[3],
@@ -104,7 +104,8 @@ void BKE_mesh_mirror_apply_mirror_on_axis(struct Main *bmain,
const int axis,
const float dist)
{
- BMesh *bm = BKE_mesh_to_bmesh_ex(mesh,
+ BMesh *bm = BKE_mesh_to_bmesh_ex(NULL,
+ mesh,
&(struct BMeshCreateParams){
.use_toolflags = 1,
},
@@ -123,6 +124,7 @@ void BKE_mesh_mirror_apply_mirror_on_axis(struct Main *bmain,
true);
BM_mesh_bm_to_me(bmain,
+ NULL,
bm,
mesh,
(&(struct BMeshToMeshParams){
diff --git a/source/blender/editors/sculpt_paint/sculpt_boundary.c b/source/blender/editors/sculpt_paint/sculpt_boundary.c
index 004d704fd8b..b4eda68d003 100644
--- a/source/blender/editors/sculpt_paint/sculpt_boundary.c
+++ b/source/blender/editors/sculpt_paint/sculpt_boundary.c
@@ -154,7 +154,8 @@ static void sculpt_boundary_index_add(SculptSession *ss,
{
boundary->vertices[boundary->num_vertices] = new_index;
- boundary->vertex_indices[boundary->num_vertices] = BKE_pbvh_vertex_index_to_table(ss->pbvh, new_index);
+ boundary->vertex_indices[boundary->num_vertices] = BKE_pbvh_vertex_index_to_table(ss->pbvh,
+ new_index);
if (boundary->distance) {
boundary->distance[BKE_pbvh_vertex_index_to_table(ss->pbvh, new_index)] = distance;
@@ -717,7 +718,8 @@ static void do_boundary_brush_bend_task_cb_ex(void *__restrict userdata,
if (SCULPT_check_vertex_pivot_symmetry(
orig_data.co, boundary->initial_vertex_position, symm)) {
const float mask = vd.mask ? 1.0f - *vd.mask : 1.0f;
- const float automask = SCULPT_automasking_factor_get(ss->cache->automasking, ss, vd.index);
+ const float automask = SCULPT_automasking_factor_get(
+ ss->cache->automasking, ss, vd.vertex);
float t_orig_co[3];
const int index = vd.index;
@@ -765,7 +767,8 @@ static void do_boundary_brush_slide_task_cb_ex(void *__restrict userdata,
if (SCULPT_check_vertex_pivot_symmetry(
orig_data.co, boundary->initial_vertex_position, symm)) {
const float mask = vd.mask ? 1.0f - *vd.mask : 1.0f;
- const float automask = SCULPT_automasking_factor_get(ss->cache->automasking, ss, vd.index);
+ const float automask = SCULPT_automasking_factor_get(
+ ss->cache->automasking, ss, vd.vertex);
float *target_co = SCULPT_brush_deform_target_vertex_co_get(ss, brush->deform_target, &vd);
madd_v3_v3v3fl(target_co,
orig_data.co,
@@ -809,7 +812,8 @@ static void do_boundary_brush_inflate_task_cb_ex(void *__restrict userdata,
if (SCULPT_check_vertex_pivot_symmetry(
orig_data.co, boundary->initial_vertex_position, symm)) {
const float mask = vd.mask ? 1.0f - *vd.mask : 1.0f;
- const float automask = SCULPT_automasking_factor_get(ss->cache->automasking, ss, vd.index);
+ const float automask = SCULPT_automasking_factor_get(
+ ss->cache->automasking, ss, vd.vertex);
float normal[3];
normal_short_to_float_v3(normal, orig_data.no);
float *target_co = SCULPT_brush_deform_target_vertex_co_get(ss, brush->deform_target, &vd);
@@ -853,7 +857,8 @@ static void do_boundary_brush_grab_task_cb_ex(void *__restrict userdata,
if (SCULPT_check_vertex_pivot_symmetry(
orig_data.co, boundary->initial_vertex_position, symm)) {
const float mask = vd.mask ? 1.0f - *vd.mask : 1.0f;
- const float automask = SCULPT_automasking_factor_get(ss->cache->automasking, ss, vd.index);
+ const float automask = SCULPT_automasking_factor_get(
+ ss->cache->automasking, ss, vd.vertex);
float *target_co = SCULPT_brush_deform_target_vertex_co_get(ss, brush->deform_target, &vd);
madd_v3_v3v3fl(target_co,
orig_data.co,
@@ -902,7 +907,8 @@ static void do_boundary_brush_twist_task_cb_ex(void *__restrict userdata,
if (SCULPT_check_vertex_pivot_symmetry(
orig_data.co, boundary->initial_vertex_position, symm)) {
const float mask = vd.mask ? 1.0f - *vd.mask : 1.0f;
- const float automask = SCULPT_automasking_factor_get(ss->cache->automasking, ss, vd.index);
+ const float automask = SCULPT_automasking_factor_get(
+ ss->cache->automasking, ss, vd.vertex);
float t_orig_co[3];
float *target_co = SCULPT_brush_deform_target_vertex_co_get(ss, brush->deform_target, &vd);
sub_v3_v3v3(t_orig_co, orig_data.co, boundary->twist.pivot_position);
More information about the Bf-blender-cvs
mailing list