[Bf-blender-cvs] [1fb667da013] master: Fix wrong upate flag when updating the PBVH visibility

Pablo Dobarro noreply at git.blender.org
Thu Jul 9 17:50:28 CEST 2020


Commit: 1fb667da013f19124eb4440411c28996d97f67f8
Author: Pablo Dobarro
Date:   Tue Jul 7 23:01:51 2020 +0200
Branches: master
https://developer.blender.org/rB1fb667da013f19124eb4440411c28996d97f67f8

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

===================================================================

M	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;
   }
 }



More information about the Bf-blender-cvs mailing list