diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-02-15 22:40:58 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-02-15 22:40:58 +0300 |
commit | 53fe4f62feae69856a8113d9e957cd305efee44f (patch) | |
tree | 6e7d3764dea386a20741b6f8bf1fcc9f9f7dd180 | |
parent | 48b26d9c2e0f4f4b6b5b7279c5bfc40c3ec77a6f (diff) |
Fix T95806: subdivision missing in Cycles when using autosmooth
Although rB56407432a6a did fix missing subdivision in some cases, in
other cases it did not return the mesh wrapper (like when using
autosmooth, which requires a copy of the mesh), so the non-subdivided
mesh was still returned.
-rw-r--r-- | source/blender/blenkernel/intern/mesh_convert.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc index f8deb4e6807..87631348188 100644 --- a/source/blender/blenkernel/intern/mesh_convert.cc +++ b/source/blender/blenkernel/intern/mesh_convert.cc @@ -1055,7 +1055,7 @@ static Mesh *mesh_new_from_mesh(Object *object, Mesh *mesh) BKE_mesh_wrapper_ensure_mdata(mesh); } else { - BKE_mesh_wrapper_ensure_subdivision(object, mesh); + mesh = BKE_mesh_wrapper_ensure_subdivision(object, mesh); } Mesh *mesh_result = (Mesh *)BKE_id_copy_ex( @@ -1093,8 +1093,7 @@ static Mesh *mesh_new_from_mesh_object_with_layers(Depsgraph *depsgraph, mask.pmask |= CD_MASK_ORIGINDEX; } Mesh *result = mesh_create_eval_final(depsgraph, scene, &object_for_eval, &mask); - BKE_mesh_wrapper_ensure_subdivision(object, result); - return result; + return BKE_mesh_wrapper_ensure_subdivision(object, result); } static Mesh *mesh_new_from_mesh_object(Depsgraph *depsgraph, |