This was introduced in 6c9ec1c893f9. The overlays can now be drawn when
PBVH drawing is not enabled, but the PBVH should still exist in the
SculptSession in order to draw them. Before, it was avoiding the crash
by checking use_pbvh as BKE_sculptsession_use_pbvh_draw also checks if
the PBVH exists.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
Please use early outputs.
You can structure this in the following way:
if (pbvh == NULL) {
/* It is possible to have SculptSession without PBVH. Happes, for example, when toggling
* objetc mode to sculpt them to edit mode.
* <Can even give more details about overlays> */
return;
}
if (!pbvh_has_mask(pbvh) && !pbvh_has_face_sets(pbvh)) {
/* <explanation why the cache is only populated for mask and face sets, as it is not
* obviously clear why generic sounding function only handles these two cases> */
return;
}| source/blender/draw/engines/overlay/overlay_sculpt.c | ||
|---|---|---|
| 58 | Happes to This happens | |