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
path: root/source
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-08-23 05:48:54 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-08-23 05:48:54 +0300
commit0de3d4e8c750b795ee193d6e5d5cd26832cb23c7 (patch)
tree8e80a3df719719082bad6177b301ec6feabf1f85 /source
parentb4773334732350162f02aab6b6154dfc73165f85 (diff)
Fix T90847: snap to face of Add Primitive tool not working in edit mode
BVHTree was being created but not balanced. Error introduced in {rBfcc844f8fbd0}.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/bvhutils.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.cc b/source/blender/blenkernel/intern/bvhutils.cc
index 164f921c7ac..707201207d9 100644
--- a/source/blender/blenkernel/intern/bvhutils.cc
+++ b/source/blender/blenkernel/intern/bvhutils.cc
@@ -1254,11 +1254,10 @@ BVHTree *bvhtree_from_editmesh_looptri_ex(BVHTreeFromEditMesh *data,
bool in_cache = bvhcache_find(
bvh_cache_p, bvh_cache_type, &tree, &lock_started, mesh_eval_mutex);
BVHCache *bvh_cache = *bvh_cache_p;
- bvhtree_balance(tree, true);
-
if (in_cache == false) {
tree = bvhtree_from_editmesh_looptri_create_tree(
epsilon, tree_type, axis, em, looptri_mask, looptri_num_active);
+ bvhtree_balance(tree, true);
/* Save on cache for later use */
// printf("BVHTree built and saved on cache\n");