From 1fb667da013f19124eb4440411c28996d97f67f8 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 7 Jul 2020 23:01:51 +0200 Subject: Fix wrong upate flag when updating the PBVH visibility This function was using the wrong flag to update the visibility state of the nodes, so I assume that most of the partially visible optimizations were not working. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8243 --- source/blender/blenkernel/intern/pbvh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/pbvh.c') diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 8d7dabf9859..77ff469a012 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -1542,7 +1542,7 @@ static void pbvh_update_visibility_task_cb(void *__restrict userdata, PBVHUpdateData *data = userdata; PBVH *pbvh = data->pbvh; PBVHNode *node = data->nodes[n]; - if (node->flag & PBVH_UpdateMask) { + if (node->flag & PBVH_UpdateVisibility) { switch (BKE_pbvh_type(pbvh)) { case PBVH_FACES: pbvh_faces_node_visibility_update(pbvh, node); @@ -1554,7 +1554,7 @@ static void pbvh_update_visibility_task_cb(void *__restrict userdata, pbvh_bmesh_node_visibility_update(node); break; } - node->flag &= ~PBVH_UpdateMask; + node->flag &= ~PBVH_UpdateVisibility; } } -- cgit v1.2.3