[Bf-blender-cvs] [c4562691daa] curve-nodes-modifier: Fix selection doesn't use evalauted mesh

Hans Goudey noreply at git.blender.org
Wed Jul 14 00:05:56 CEST 2021


Commit: c4562691daa6955a63b12a993bf7346656db5dad
Author: Hans Goudey
Date:   Tue Jul 13 17:38:59 2021 -0400
Branches: curve-nodes-modifier
https://developer.blender.org/rBc4562691daa6955a63b12a993bf7346656db5dad

Fix selection doesn't use evalauted mesh

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

M	source/blender/blenkernel/intern/displist.cc

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

diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc
index e0ffeda281b..6c0ed954d79 100644
--- a/source/blender/blenkernel/intern/displist.cc
+++ b/source/blender/blenkernel/intern/displist.cc
@@ -1544,6 +1544,16 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph,
     GeometrySet geometry_set;
     evaluate_curve_type_object(depsgraph, scene, ob, for_render, dispbase, &geometry_set);
 
+    /* Assign the object's "data_eval" so that selection and other existing code knows how to
+     * access this. This isn't ideal since it gives special handling to the mesh, which should
+     * change eventually. */
+    if (geometry_set.has_mesh()) {
+      MeshComponent &mesh_component = geometry_set.get_component_for_write<MeshComponent>();
+      Mesh *mesh_eval = mesh_component.release();
+      BKE_object_eval_assign_data(ob, &mesh_eval->id, true);
+      mesh_component.replace(mesh_eval, GeometryOwnershipType::ReadOnly);
+    }
+
     /* If the curve is in edit mode, make sure the output geometry set containts a
      * curve component, which is used indirectly to render the edit mode overlays. */
     const Curve *curve_orig = (const Curve *)ob->data;



More information about the Bf-blender-cvs mailing list