From 47b8baa5c4e5b713d33e3925df9d55b882ae2a27 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 10 Nov 2021 13:38:07 +0100 Subject: Fix T92864: curve object does not sync correctly in cycles The issue was that the `object_is_geometry` method was used in two different contexts that expected the function to behave differently. So a recent change that fixed `object_is_geometry` for one context, broke it for the other context. The two contexts are: * Check if a "real" object can contain a geometry to check if it has to be tagged for sync after an update. * Check if an object/instance actually is a geometry that cycles can work with. I created a new `object_can_have_geometry` method for the first use case, instead of trying to adapt the existing object_is_geometry method to serve both uses. Additionally, I changed it so that a BObjectInfo is passed into `object_is_geometry` to make it more explicit when this method is supposed to be used. Differential Revision: https://developer.blender.org/D13135 --- intern/cycles/blender/sync.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'intern/cycles/blender/sync.h') diff --git a/intern/cycles/blender/sync.h b/intern/cycles/blender/sync.h index 7e5d0324ca9..98197564bec 100644 --- a/intern/cycles/blender/sync.h +++ b/intern/cycles/blender/sync.h @@ -208,7 +208,8 @@ class BlenderSync { /* util */ void find_shader(BL::ID &id, array &used_shaders, Shader *default_shader); bool BKE_object_is_modified(BL::Object &b_ob); - bool object_is_geometry(BL::Object &b_ob); + bool object_is_geometry(BObjectInfo &b_ob_info); + bool object_can_have_geometry(BL::Object &b_ob); bool object_is_light(BL::Object &b_ob); /* variables */ -- cgit v1.2.3