diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-13 17:42:56 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-13 17:42:56 +0300 |
commit | 4943739b89c010f08ddcc7bc02bf04acf7f0bc8d (patch) | |
tree | 38674282286ec72693929b481d9aa3643da8b746 /source/blender/editors/mesh | |
parent | b8015ece51c22224265c55196eff61a8f33d7239 (diff) | |
parent | f61c30f804e36bf00e7124514f02bbee42e0197d (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenloader/intern/readfile.c
source/blender/editors/mesh/editmesh_utils.c
source/blenderplayer/bad_level_call_stubs/stubs.c
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_undo.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 5 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 3 |
4 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index fef8d6575ed..3fdca4562d1 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3642,7 +3642,7 @@ static Base *mesh_separate_tagged(Main *bmain, Scene *scene, ViewLayer *view_lay BM_mesh_normals_update(bm_new); - BM_mesh_bm_to_me(bm_new, base_new->object->data, (&(struct BMeshToMeshParams){0})); + BM_mesh_bm_to_me(bmain, bm_new, base_new->object->data, (&(struct BMeshToMeshParams){0})); BM_mesh_free(bm_new); ((Mesh *)base_new->object->data)->edit_btmesh = NULL; @@ -3955,7 +3955,7 @@ static int edbm_separate_exec(bContext *C, wmOperator *op) if (retval_iter) { BM_mesh_bm_to_me( - bm_old, me, + bmain, bm_old, me, (&(struct BMeshToMeshParams){ .calc_object_remap = true, })); diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c index 4d4b7a098b0..97445ebc9e0 100644 --- a/source/blender/editors/mesh/editmesh_undo.c +++ b/source/blender/editors/mesh/editmesh_undo.c @@ -511,8 +511,8 @@ static void *undomesh_from_editmesh(UndoMesh *um, BMEditMesh *em, Key *key) /* BM_mesh_validate(em->bm); */ /* for troubleshooting */ BM_mesh_bm_to_me( - em->bm, &um->me, (&(struct BMeshToMeshParams){ - /* Undo code should not be manipulating 'G.main->object' hooks/vertex-parent. */ + NULL, em->bm, &um->me, (&(struct BMeshToMeshParams){ + /* Undo code should not be manipulating 'G_MAIN->object' hooks/vertex-parent. */ .calc_object_remap = false, .cd_mask_extra = CD_MASK_SHAPE_KEYINDEX, })); diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index bbc9471638d..e18758a5a58 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -43,6 +43,7 @@ #include "BKE_DerivedMesh.h" #include "BKE_context.h" +#include "BKE_main.h" #include "BKE_mesh.h" #include "BKE_mesh_mapping.h" #include "BKE_report.h" @@ -330,7 +331,7 @@ void EDBM_mesh_make(Object *ob, const int select_mode, const bool add_key_index) * \warning This can invalidate the #DerivedMesh cache of other objects (for linked duplicates). * Most callers should run #DEG_id_tag_update on \a ob->data, see: T46738, T46913 */ -void EDBM_mesh_load(Object *ob) +void EDBM_mesh_load(Main *bmain, Object *ob) { Mesh *me = ob->data; BMesh *bm = me->edit_btmesh->bm; @@ -342,7 +343,7 @@ void EDBM_mesh_load(Object *ob) } BM_mesh_bm_to_me( - bm, me, (&(struct BMeshToMeshParams){ + bmain, bm, me, (&(struct BMeshToMeshParams){ .calc_object_remap = true, })); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index d2410c7d97b..46b84f328cc 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -538,6 +538,7 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot) static int drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *event) { + Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); Base *base; @@ -578,7 +579,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *e return OPERATOR_CANCELLED; if (exitmode) { - EDBM_mesh_load(obedit); + EDBM_mesh_load(bmain, obedit); EDBM_mesh_free(me->edit_btmesh); MEM_freeN(me->edit_btmesh); me->edit_btmesh = NULL; |