diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-11-03 18:39:27 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-11-03 18:39:27 +0300 |
commit | 5deb2d42d957a0992cf5285ddc988e06c3990009 (patch) | |
tree | 5759ddea76181c53e84a6cdc5574e1bcceb90785 /source/blender/modifiers/intern | |
parent | 6fdcca8de64cd70f237640b67ce2d0068b918d05 (diff) | |
parent | 0cf46631e11a819aceece60e3b23491d22e9d077 (diff) |
Merge branch 'blender-v2.91-release'
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_volume_to_mesh.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc index bbd1bdb6955..cd8c8e8b5e3 100644 --- a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc +++ b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc @@ -237,7 +237,8 @@ static Mesh *new_mesh_from_openvdb_data(Span<openvdb::Vec3s> verts, mesh->mpoly[i].loopstart = 3 * i; mesh->mpoly[i].totloop = 3; for (int j = 0; j < 3; j++) { - mesh->mloop[3 * i + j].v = tris[i][j]; + /* Reverse vertex order to get correct normals. */ + mesh->mloop[3 * i + j].v = tris[i][2 - j]; } } @@ -248,7 +249,8 @@ static Mesh *new_mesh_from_openvdb_data(Span<openvdb::Vec3s> verts, mesh->mpoly[poly_offset + i].loopstart = loop_offset + 4 * i; mesh->mpoly[poly_offset + i].totloop = 4; for (int j = 0; j < 4; j++) { - mesh->mloop[loop_offset + 4 * i + j].v = quads[i][j]; + /* Reverse vertex order to get correct normals. */ + mesh->mloop[loop_offset + 4 * i + j].v = quads[i][3 - j]; } } |