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
committerHans Goudey <h.goudey@me.com>2021-11-05 19:51:34 +0300
commit1bc655c5aa644c1b3b933f9e372ec5b5b504c0d5 (patch)
tree1005a6c1e2a530062f89a2d16556bc2946167ee9 /intern/cycles/blender
parentc473b2ce8bdbf8fa42d9780de035d34cb8d0e8a5 (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 'intern/cycles/blender')
-rw-r--r--intern/cycles/blender/object.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/intern/cycles/blender/object.cpp b/intern/cycles/blender/object.cpp
index 3800ea0ecd2..698800f9957 100644
--- a/intern/cycles/blender/object.cpp
+++ b/intern/cycles/blender/object.cpp
@@ -76,18 +76,15 @@ bool BlenderSync::object_is_geometry(BL::Object &b_ob)
/* Will be exported attached to mesh. */
return true;
}
- else if (type == BL::Object::type_CURVE) {
- /* Skip exporting curves without faces, overhead can be
- * significant if there are many for path animation. */
- BL::Curve b_curve(b_ob_data);
- return (b_curve.bevel_object() || b_curve.extrude() != 0.0f || b_curve.bevel_depth() != 0.0f ||
- b_curve.dimensions() == BL::Curve::dimensions_2D || b_ob.modifiers.length());
- }
- else {
- return (b_ob_data.is_a(&RNA_Mesh) || b_ob_data.is_a(&RNA_Curve) ||
- b_ob_data.is_a(&RNA_MetaBall));
+ /* Other object types that are not meshes but evaluate to meshes are presented to render engines
+ * as separate instance objects. Metaballs and surface objects have not been affected by that
+ * change yet. */
+ if (type == BL::Object::type_SURFACE || type == BL::Object::type_META) {
+ return true;
}
+
+ return b_ob_data.is_a(&RNA_Mesh);
}
bool BlenderSync::object_is_light(BL::Object &b_ob)