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}.
This commit is contained in:
Germano Cavalcante 2021-08-22 23:48:54 -03:00
parent b477333473
commit 0de3d4e8c7
Notes: blender-bot 2023-02-14 08:10:10 +01:00
Referenced by issue #90847, Add cube/cone/etc. surface snapping is broken in edit mode
1 changed files with 1 additions and 2 deletions

View File

@ -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");