Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-11-05 19:51:34 +0300
committerPablo Vazquez <pablo@blender.org>2021-11-05 21:20:47 +0300
commit3211c80a3110729a5ffaf064297ccb625850e8a1 (patch)
treebe5daac371d6efb8a63697e748503bea2f4314f4 /source/blender/blenkernel/intern/DerivedMesh.cc
parent8d2a0d9b4cc3d08e0b58bf5acd27388fc34ae639 (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/DerivedMesh.cc')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.cc b/source/blender/blenkernel/intern/DerivedMesh.cc
index 4b1332d5b84..ced9076bbfd 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.cc
+++ b/source/blender/blenkernel/intern/DerivedMesh.cc
@@ -1896,9 +1896,9 @@ static void mesh_build_data(struct Depsgraph *depsgraph,
const bool is_mesh_eval_owned = (mesh_eval != mesh->runtime.mesh_eval);
BKE_object_eval_assign_data(ob, &mesh_eval->id, is_mesh_eval_owned);
- /* Add the final mesh as read-only non-owning component to the geometry set. */
+ /* Add the final mesh as a non-owning component to the geometry set. */
MeshComponent &mesh_component = geometry_set_eval->get_component_for_write<MeshComponent>();
- mesh_component.replace(mesh_eval, GeometryOwnershipType::ReadOnly);
+ mesh_component.replace(mesh_eval, GeometryOwnershipType::Editable);
ob->runtime.geometry_set_eval = geometry_set_eval;
ob->runtime.mesh_deform_eval = mesh_deform_eval;