[Bf-blender-cvs] [d34f8ac3d9a] master: Cleanup: Remove unnecessary handling of normals for fluid colliders

Hans Goudey noreply at git.blender.org
Wed Jul 20 20:18:44 CEST 2022


Commit: d34f8ac3d9a4c3402fd620253d70bbf71e09abd2
Author: Hans Goudey
Date:   Wed Jul 20 13:17:49 2022 -0500
Branches: master
https://developer.blender.org/rBd34f8ac3d9a4c3402fd620253d70bbf71e09abd2

Cleanup: Remove unnecessary handling of normals for fluid colliders

The normals are transformed, but not used. It looks like this logic was
just copied from below where the mesh is transformed for creating
emitters, which do use vertex normals.

===================================================================

M	source/blender/blenkernel/intern/fluid.c

===================================================================

diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 8e95bf18c6b..0fc09803088 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -1038,8 +1038,6 @@ static void obstacles_from_mesh(Object *coll_ob,
 
     /* Transform mesh vertices to domain grid space for fast lookups.
      * This is valid because the mesh is copied above. */
-    BKE_mesh_vertex_normals_ensure(me);
-    float(*vert_normals)[3] = BKE_mesh_vertex_normals_for_write(me);
     for (i = 0; i < numverts; i++) {
       float co[3];
 
@@ -1047,11 +1045,6 @@ static void obstacles_from_mesh(Object *coll_ob,
       mul_m4_v3(coll_ob->obmat, mvert[i].co);
       manta_pos_to_cell(fds, mvert[i].co);
 
-      /* Vertex normal. */
-      mul_mat3_m4_v3(coll_ob->obmat, vert_normals[i]);
-      mul_mat3_m4_v3(fds->imat, vert_normals[i]);
-      normalize_v3(vert_normals[i]);
-
       /* Vertex velocity. */
       add_v3fl_v3fl_v3i(co, mvert[i].co, fds->shift);
       if (has_velocity) {



More information about the Bf-blender-cvs mailing list