diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2022-04-06 16:52:26 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-04-06 22:37:47 +0300 |
commit | 99b82116ef671959ae2dda33f11c49c9ba584cdf (patch) | |
tree | 90dfa77947c1ed30de58958fdf5ac09aa82e0132 /source | |
parent | fcf06d2ad7cac89cd5b7faa1d27bf23230fababc (diff) |
Cleanup: remove workaround to set treedata members
This workaround is not needed since
228f7f1c850897cac85b2c4b42cf9052976b7be1
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.cc | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc index eaa657ecbf3..c3168b58c47 100644 --- a/source/blender/editors/transform/transform_snap_object.cc +++ b/source/blender/editors/transform/transform_snap_object.cc @@ -312,20 +312,13 @@ static SnapObjectData *snap_object_data_mesh_get(SnapObjectContext *sctx, use_hide ? BVHTREE_FROM_LOOPTRI_NO_HIDDEN : BVHTREE_FROM_LOOPTRI, 4); - if (sod->treedata_mesh.tree == nullptr) { - sod->treedata_mesh.vert = me_eval->mvert; - sod->treedata_mesh.vert_normals = BKE_mesh_vertex_normals_ensure(me_eval); - sod->treedata_mesh.loop = me_eval->mloop; - sod->treedata_mesh.looptri = BKE_mesh_runtime_looptri_ensure(me_eval); - BLI_assert(sod->has_looptris == false); - } - else { - BLI_assert(sod->treedata_mesh.vert != nullptr); - BLI_assert(sod->treedata_mesh.vert_normals != nullptr); - BLI_assert(sod->treedata_mesh.loop != nullptr); - BLI_assert(sod->treedata_mesh.looptri != nullptr); - sod->has_looptris = true; - } + BLI_assert(sod->treedata_mesh.vert != nullptr); + BLI_assert(sod->treedata_mesh.vert_normals != nullptr); + BLI_assert(sod->treedata_mesh.loop != nullptr); + BLI_assert(sod->treedata_mesh.looptri != nullptr); + BLI_assert(sod->has_looptris == false); + + sod->has_looptris = sod->treedata_mesh.tree != nullptr; /* Required for snapping with occlusion. */ sod->treedata_mesh.edge = me_eval->medge; |