diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-01-07 05:49:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-01-07 05:53:03 +0300 |
commit | a8d11995bfcb16d2ecdfdb196e0ed708d8cf5c36 (patch) | |
tree | c6a885ab1f2814b1cad27344e819705b232360a7 /source/blender/blenkernel | |
parent | 592e245a90e250167956e95cc949577ecd4430a1 (diff) |
BMesh: remove BMEditMesh.ob use for vert coord access, projection
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_editmesh.h | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/editmesh.c | 9 |
2 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_editmesh.h b/source/blender/blenkernel/BKE_editmesh.h index 7c27362e244..3f9206ac9f8 100644 --- a/source/blender/blenkernel/BKE_editmesh.h +++ b/source/blender/blenkernel/BKE_editmesh.h @@ -92,8 +92,11 @@ BMEditMesh *BKE_editmesh_from_object(struct Object *ob); void BKE_editmesh_free_derivedmesh(BMEditMesh *em); void BKE_editmesh_free(BMEditMesh *em); -float (*BKE_editmesh_vert_coords_alloc( - struct Depsgraph *depsgraph, struct BMEditMesh *em, struct Scene *scene, int *r_vert_len))[3]; +float (*BKE_editmesh_vert_coords_alloc(struct Depsgraph *depsgraph, + struct BMEditMesh *em, + struct Scene *scene, + struct Object *ob, + int *r_vert_len))[3]; float (*BKE_editmesh_vert_coords_alloc_orco(BMEditMesh *em, int *r_vert_len))[3]; void BKE_editmesh_lnorspace_update(BMEditMesh *em); void BKE_editmesh_ensure_autosmooth(BMEditMesh *em); diff --git a/source/blender/blenkernel/intern/editmesh.c b/source/blender/blenkernel/intern/editmesh.c index 1065f11a521..d7c52fc16ae 100644 --- a/source/blender/blenkernel/intern/editmesh.c +++ b/source/blender/blenkernel/intern/editmesh.c @@ -188,15 +188,18 @@ static void cage_mapped_verts_callback(void *userData, } } -float (*BKE_editmesh_vert_coords_alloc( - struct Depsgraph *depsgraph, BMEditMesh *em, struct Scene *scene, int *r_vert_len))[3] +float (*BKE_editmesh_vert_coords_alloc(struct Depsgraph *depsgraph, + BMEditMesh *em, + struct Scene *scene, + Object *ob, + int *r_vert_len))[3] { Mesh *cage; BLI_bitmap *visit_bitmap; struct CageUserData data; float(*cos_cage)[3]; - cage = editbmesh_get_eval_cage(depsgraph, scene, em->ob, em, &CD_MASK_BAREMESH); + cage = editbmesh_get_eval_cage(depsgraph, scene, ob, em, &CD_MASK_BAREMESH); cos_cage = MEM_callocN(sizeof(*cos_cage) * em->bm->totvert, "bmbvh cos_cage"); /* when initializing cage verts, we only want the first cage coordinate for each vertex, |