Fix #134039: Alembic procedural proxy mesh should be owned by GeometrySet

When using Alembic procedurals, the Mesh Sequence Cache attempts to
replace the original geometry with a plain old cube. However, it never
frees this new cube geometry. Transfer ownership to the underlying
GeometrySet instead.

Investigating the scenario also showed that the `~AlembicProcedural`
dtor was removing an item from the `nodes` vector while iterating over
it, which triggers debug asserts on at least MSVC. I believe the removal
is unnecessary since this is the dtor and ASAN appears clean now.

Pull Request: https://projects.blender.org/blender/blender/pulls/134085
This commit is contained in:
Jesse Yurkovich
2025-03-06 20:53:52 +01:00
committed by Jesse Yurkovich
parent b9907cb60b
commit 3a0e4fe316
2 changed files with 1 additions and 3 deletions

View File

@@ -819,8 +819,6 @@ AlembicProcedural::~AlembicProcedural()
geometries_set.insert(abc_object->get_object()->get_geometry());
}
}
delete_node(abc_object);
}
/* We may delete a Procedural before rendering started, so scene_ can be null. */

View File

@@ -208,7 +208,7 @@ static void modify_geometry_set(ModifierData *md,
pointcloud->bounds_min_max(), pointcloud->mat, pointcloud->totcol);
}
*geometry_set = bke::GeometrySet::from_mesh(bbox, bke::GeometryOwnershipType::Editable);
*geometry_set = bke::GeometrySet::from_mesh(bbox);
return;
}