Fix T91600: Cycles viewport not updaing on metaball changes

This commit is contained in:
Brecht Van Lommel 2021-09-22 15:53:04 +02:00
parent 53e7c64be7
commit e57ce464c2
Notes: blender-bot 2023-02-14 05:59:31 +01:00
Referenced by issue #91600, Cycles Regression: Metaballs not updating in viewport.
Referenced by issue #91516, Geometry Nodes Instance Invisible in Cycles
1 changed files with 4 additions and 2 deletions

View File

@ -80,7 +80,9 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
{
/* Test if we can instance or if the object is modified. */
Geometry::Type geom_type = determine_geom_type(b_ob_info, use_particle_hair);
GeometryKey key(b_ob_info.object_data, geom_type);
BL::ID b_key_id = (BKE_object_is_modified(b_ob_info.real_object)) ? b_ob_info.real_object :
b_ob_info.object_data;
GeometryKey key(b_key_id.ptr.data, geom_type);
/* Find shader indices. */
array<Node *> used_shaders = find_used_shaders(b_ob_info.iter_object);
@ -110,7 +112,7 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
}
else {
/* Test if we need to update existing geometry. */
sync = geometry_map.update(geom, b_ob_info.object_data);
sync = geometry_map.update(geom, b_key_id);
}
if (!sync) {