diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-03-13 19:16:38 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-03-13 19:17:26 +0300 |
commit | 5ad16e6a114b0a22f0cbedfa57d2457c31058f95 (patch) | |
tree | 0b652c9cee3483eda1ebbdfa2778777339f8f9b2 /source/blender/blenkernel/intern | |
parent | 4e26afe0aec8126f590eb8ba3d8139723f3c31b3 (diff) |
Cleanup: `BKE_mesh_nomain_to_mesh`: Add assert that source mesh is indeed not in Main.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_convert.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c index f0bab4c0aa2..ce8fcc4eeb9 100644 --- a/source/blender/blenkernel/intern/mesh_convert.c +++ b/source/blender/blenkernel/intern/mesh_convert.c @@ -1420,6 +1420,8 @@ void BKE_mesh_nomain_to_mesh(Mesh *mesh_src, const CustomData_MeshMasks *mask, bool take_ownership) { + BLI_assert(mesh_src->id.tag & LIB_TAG_NO_MAIN); + /* mesh_src might depend on mesh_dst, so we need to do everything with a local copy */ /* TODO(Sybren): the above claim came from 2.7x derived-mesh code (DM_to_mesh); * check whether it is still true with Mesh */ @@ -1571,6 +1573,8 @@ void BKE_mesh_nomain_to_mesh(Mesh *mesh_src, void BKE_mesh_nomain_to_meshkey(Mesh *mesh_src, Mesh *mesh_dst, KeyBlock *kb) { + BLI_assert(mesh_src->id.tag & LIB_TAG_NO_MAIN); + int a, totvert = mesh_src->totvert; float *fp; MVert *mvert; |