Fix #120400: Remove cyclic dependency of pbvh type when building bmesh pbvh
commitea1cfdbf83fce3ba01683ab891e08392b6d802fe
authorSean Kim <SeanCTKim@protonmail.com>
Wed, 10 Apr 2024 00:57:34 +0000 (10 02:57 +0200)
committerHans Goudey <hooglyboogly@noreply.localhost>
Wed, 10 Apr 2024 00:57:34 +0000 (10 02:57 +0200)
tree07243614f93203a4ac30ce3d63d37828cc05fdd9
parent193789f03618d84232346473e5c2d3de14725953
Fix #120400: Remove cyclic dependency of pbvh type when building bmesh pbvh

This PR fixes a crash when enabling Dyntopo.

When the PBVH generation code for BMesh was changed in b3aca5b28f, a
bug was introduced where dependent code to generate necessary layers
for BMesh could no longer access the PBVH type, as it was not generated
yet. As the type is known in the code at time of construction, I opted
to add parameters specifying the PBVHType to necessary methods when
accessing attributes.

Pull Request: https://projects.blender.org/blender/blender/pulls/120445
source/blender/blenkernel/intern/paint.cc