diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-03-03 06:20:25 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-03-03 06:20:25 +0300 |
commit | 29716abcd15406004c505f051f4a2932dff64914 (patch) | |
tree | f771bc0ca98df88771fd1f32f99366fa559a3b46 /source/blender/editors | |
parent | 3e1aa6cbf3df6f9f0f96380386a7c8d64c07cc64 (diff) |
Missed in the last commit
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 3992c3a3036..2bb5424722f 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -279,6 +279,11 @@ static SnapObjectData *snap_object_data_editmesh_get(SnapObjectContext *sctx, else if (sod->treedata_editmesh.em != em) { /* Clear only cached. */ init_min_max = false; + if (sod->treedata_editmesh.cached) { + sod->treedata_editmesh.tree = NULL; + /* Only init min and max when you have a non-custom bvhtree pending. */ + init_min_max = true; + } for (int i = 0; i < ARRAY_SIZE(sod->bvhtree); i++) { if (sod->cached[i]) { sod->bvhtree[i] = NULL; |