[Bf-blender-cvs] [45db0ecb1c9] temp-vert-normals-cleanup: Updates after change in master, cleanup
Hans Goudey
noreply at git.blender.org
Tue Dec 21 17:57:55 CET 2021
Commit: 45db0ecb1c9e59af05478b66c740c98669673f92
Author: Hans Goudey
Date: Tue Dec 21 10:57:47 2021 -0600
Branches: temp-vert-normals-cleanup
https://developer.blender.org/rB45db0ecb1c9e59af05478b66c740c98669673f92
Updates after change in master, cleanup
===================================================================
M source/blender/blenkernel/BKE_mesh_remap.h
M source/blender/blenkernel/intern/data_transfer.c
M source/blender/blenkernel/intern/mesh_remap.c
M source/blender/editors/sculpt_paint/sculpt_brushes.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_mesh_remap.h b/source/blender/blenkernel/BKE_mesh_remap.h
index 400c76dad25..24bca006b1f 100644
--- a/source/blender/blenkernel/BKE_mesh_remap.h
+++ b/source/blender/blenkernel/BKE_mesh_remap.h
@@ -220,7 +220,6 @@ void BKE_mesh_remap_calc_loops_from_mesh(const int mode,
struct MPoly *polys_dst,
const int numpolys_dst,
struct CustomData *ldata_dst,
- struct CustomData *pdata_dst,
const bool use_split_nors_dst,
const float split_angle_dst,
const bool dirty_nors_dst,
@@ -235,13 +234,9 @@ void BKE_mesh_remap_calc_polys_from_mesh(const int mode,
const float ray_radius,
struct Mesh *mesh_dst,
struct MVert *verts_dst,
- const int numverts_dst,
struct MLoop *loops_dst,
- const int numloops_dst,
struct MPoly *polys_dst,
const int numpolys_dst,
- struct CustomData *pdata_dst,
- const bool dirty_nors_dst,
struct Mesh *me_src,
struct MeshPairRemap *r_map);
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index 12c7b8f3c8b..0ad7efb6347 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -1635,7 +1635,6 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
const int num_polys_dst = me_dst->totpoly;
MLoop *loops_dst = me_dst->mloop;
const int num_loops_dst = me_dst->totloop;
- CustomData *pdata_dst = &me_dst->pdata;
CustomData *ldata_dst = &me_dst->ldata;
MeshRemapIslandsCalc island_callback = data_transfer_get_loop_islands_generator(cddata_type);
@@ -1679,7 +1678,6 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
polys_dst,
num_polys_dst,
ldata_dst,
- pdata_dst,
(me_dst->flag & ME_AUTOSMOOTH) != 0,
me_dst->smoothresh,
dirty_nors_dst,
@@ -1730,7 +1728,6 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
const int num_polys_dst = me_dst->totpoly;
MLoop *loops_dst = me_dst->mloop;
const int num_loops_dst = me_dst->totloop;
- CustomData *pdata_dst = &me_dst->pdata;
if (!geom_map_init[PDATA]) {
const int num_polys_src = me_src->totpoly;
@@ -1763,13 +1760,9 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
ray_radius,
me_dst,
verts_dst,
- num_verts_dst,
loops_dst,
- num_loops_dst,
polys_dst,
num_polys_dst,
- pdata_dst,
- dirty_nors_dst,
me_src,
&geom_map[PDATA]);
geom_map_init[PDATA] = true;
diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c
index f2f233e587a..a9f61e9827b 100644
--- a/source/blender/blenkernel/intern/mesh_remap.c
+++ b/source/blender/blenkernel/intern/mesh_remap.c
@@ -1255,7 +1255,6 @@ void BKE_mesh_remap_calc_loops_from_mesh(const int mode,
MPoly *polys_dst,
const int numpolys_dst,
CustomData *ldata_dst,
- CustomData *pdata_dst,
const bool use_split_nors_dst,
const float split_angle_dst,
const bool dirty_nors_dst,
@@ -1303,7 +1302,7 @@ void BKE_mesh_remap_calc_loops_from_mesh(const int mode,
const float(*poly_nors_src)[3] = NULL;
const float(*loop_nors_src)[3] = NULL;
- float(*poly_nors_dst)[3] = NULL;
+ const float(*poly_nors_dst)[3] = NULL;
float(*loop_nors_dst)[3] = NULL;
float(*poly_cents_src)[3] = NULL;
@@ -2178,19 +2177,15 @@ void BKE_mesh_remap_calc_polys_from_mesh(const int mode,
const float ray_radius,
Mesh *mesh_dst,
MVert *verts_dst,
- const int numverts_dst,
MLoop *loops_dst,
- const int numloops_dst,
MPoly *polys_dst,
const int numpolys_dst,
- CustomData *pdata_dst,
- const bool dirty_nors_dst,
Mesh *me_src,
MeshPairRemap *r_map)
{
const float full_weight = 1.0f;
const float max_dist_sq = max_dist * max_dist;
- float(*poly_nors_dst)[3] = NULL;
+ const float(*poly_nors_dst)[3] = NULL;
float tmp_co[3], tmp_no[3];
int i;
diff --git a/source/blender/editors/sculpt_paint/sculpt_brushes.c b/source/blender/editors/sculpt_paint/sculpt_brushes.c
index 8842d93410c..c2acc361a79 100644
--- a/source/blender/editors/sculpt_paint/sculpt_brushes.c
+++ b/source/blender/editors/sculpt_paint/sculpt_brushes.c
@@ -1544,7 +1544,7 @@ static void do_layer_brush_task_cb_ex(void *__restrict userdata,
madd_v3_v3v3fl(final_co, SCULPT_vertex_persistent_co_get(ss, vi), normal, *disp_factor);
}
else {
- normal_short_to_float_v3(normal, orig_data.no);
+ copy_v3_v3(normal, orig_data.no);
mul_v3_fl(normal, brush->height);
madd_v3_v3v3fl(final_co, orig_data.co, normal, *disp_factor);
}
@@ -1623,7 +1623,7 @@ static void do_inflate_brush_task_cb_ex(void *__restrict userdata,
copy_v3_v3(val, vd.fno);
}
else {
- normal_short_to_float_v3(val, vd.no);
+ copy_v3_v3(val, vd.no);
}
mul_v3_fl(val, fade * ss->cache->radius);
@@ -2002,7 +2002,7 @@ static void do_grab_brush_task_cb_ex(void *__restrict userdata,
mul_v3_fl(silhouette_test_dir, -1.0f);
}
float vno[3];
- normal_short_to_float_v3(vno, orig_data.no);
+ copy_v3_v3(vno, orig_data.no);
fade *= max_ff(dot_v3v3(vno, silhouette_test_dir), 0.0f);
}
More information about the Bf-blender-cvs
mailing list