diff options
author | Hans Goudey <h.goudey@me.com> | 2021-11-05 19:51:34 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-11-05 19:51:34 +0300 |
commit | 1bc655c5aa644c1b3b933f9e372ec5b5b504c0d5 (patch) | |
tree | 1005a6c1e2a530062f89a2d16556bc2946167ee9 /source/blender/blenkernel/intern/displist.cc | |
parent | c473b2ce8bdbf8fa42d9780de035d34cb8d0e8a5 (diff) |
Fix T92815: Incorrect handling of evaluated meshes from curves
Evaluated meshes from curves are presented to render engines as
separate instance objects now, just like evaluated meshes from other
object types like point clouds and volumes. For that reason, cycles
should not consider curve objects as geometry (previously it did,
meaning it retrieved a second mesh from the curve object as well
as the temporary evaluated mesh geometry).
Further, avoid adding a curve object's evaluated mesh as data_eval,
since that is special behavior for meshes that is arbitrary. Adding an
evaluated mesh there but not an evalauted pointcloud is arbitrary,
for example. Retrieve the evaluated mesh in from the geometry set
in BKE_object_get_evaluated_mesh now, to support that change.
This gets us closer to a place where all of an object's evaluated data
is stored in geometry_set_eval, and we just have helper functions
to access specific geometry components.
Differential Revision: https://developer.blender.org/D13118
Diffstat (limited to 'source/blender/blenkernel/intern/displist.cc')
-rw-r--r-- | source/blender/blenkernel/intern/displist.cc | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc index ebe00531e65..0bf436aa8b2 100644 --- a/source/blender/blenkernel/intern/displist.cc +++ b/source/blender/blenkernel/intern/displist.cc @@ -1524,15 +1524,6 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph, cow_curve.curve_eval = curve_component.get_for_write(); BKE_object_eval_assign_data(ob, &cow_curve.id, false); } - else if (geometry.has_mesh()) { - /* Most areas of Blender don't yet know how to look in #geometry_set_eval for evaluated mesh - * data, and look in #data_eval instead. When the object evaluates to a curve, that field - * must be used for the evaluated curve data, but otherwise we can use the field to store a - * pointer to the mesh, so more areas can retrieve the mesh. */ - MeshComponent &mesh_component = geometry.get_component_for_write<MeshComponent>(); - Mesh *mesh_eval = mesh_component.get_for_write(); - BKE_object_eval_assign_data(ob, &mesh_eval->id, false); - } ob->runtime.geometry_set_eval = new GeometrySet(std::move(geometry)); } |