mirror of
https://github.com/blender/blender
synced 2026-09-27 01:34:15 +03:00
Fix #117865: "Create Face Sets" operator crashes for multires
The same implementation is used for meshes and multires grids, since face sets are always stored per base mesh fast. We just need to account for that in one place to avoid the crash.
This commit is contained in:
parent
4797773604
commit
72d324bd81
1 changed files with 4 additions and 2 deletions
|
|
@ -491,8 +491,10 @@ static void face_sets_update(Object &object,
|
|||
threading::parallel_for(nodes.index_range(), 1, [&](const IndexRange range) {
|
||||
TLS &tls = all_tls.local();
|
||||
for (PBVHNode *node : nodes.slice(range)) {
|
||||
const Span<int> faces = bke::pbvh::node_face_indices_calc_mesh(
|
||||
pbvh, *node, tls.face_indices);
|
||||
const Span<int> faces =
|
||||
BKE_pbvh_type(&pbvh) == PBVH_FACES ?
|
||||
bke::pbvh::node_face_indices_calc_mesh(pbvh, *node, tls.face_indices) :
|
||||
bke::pbvh::node_face_indices_calc_grids(pbvh, *node, tls.face_indices);
|
||||
|
||||
tls.new_face_sets.reinitialize(faces.size());
|
||||
MutableSpan<int> new_face_sets = tls.new_face_sets;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue