Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-11-14 12:05:40 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-11-14 12:05:40 +0400
commit2417967267a35451331f05307a79cdcd596a5859 (patch)
treeaa63f05067ee98587f82a8511b5bc71f90ccad5f /source/blender
parent4cd129bb508d75ff635199397e9ff17cebd0639e (diff)
Fix #33171: Sculpt lag in recent builds
Issue was caused by own previous change in PBVH which in this case lead to unneeded draw buffers rebuilding.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/intern/pbvh.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c
index e21ce0716d2..6fa6d86589f 100644
--- a/source/blender/blenlib/intern/pbvh.c
+++ b/source/blender/blenlib/intern/pbvh.c
@@ -1715,11 +1715,14 @@ void BLI_pbvh_grids_update(PBVH *bvh, CCGElem **grids, DMGridAdjacency *gridadj,
bvh->grids = grids;
bvh->gridadj = gridadj;
bvh->gridfaces = gridfaces;
- bvh->grid_flag_mats = flagmats;
- bvh->grid_hidden = grid_hidden;
- for (a = 0; a < bvh->totnode; ++a)
- BLI_pbvh_node_mark_rebuild_draw(&bvh->nodes[a]);
+ if (flagmats != bvh->grid_flag_mats || bvh->grid_hidden != grid_hidden) {
+ bvh->grid_flag_mats = flagmats;
+ bvh->grid_hidden = grid_hidden;
+
+ for (a = 0; a < bvh->totnode; ++a)
+ BLI_pbvh_node_mark_rebuild_draw(&bvh->nodes[a]);
+ }
}
float (*BLI_pbvh_get_vertCos(PBVH * pbvh))[3]