[Bf-blender-cvs] [4943739b89c] blender2.8: Merge branch 'master' into blender2.8
Bastien Montagne
noreply at git.blender.org
Wed Jun 13 16:43:09 CEST 2018
Commit: 4943739b89c010f08ddcc7bc02bf04acf7f0bc8d
Author: Bastien Montagne
Date: Wed Jun 13 16:42:56 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB4943739b89c010f08ddcc7bc02bf04acf7f0bc8d
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
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/mesh.c
index b325d8d02d9,770d482b33b..e83f2d92dd9
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@@ -712,27 -545,6 +712,28 @@@ BMesh *BKE_mesh_to_bmesh_ex
return bm;
}
+BMesh *BKE_mesh_to_bmesh(
+ Mesh *me, Object *ob,
+ const bool add_key_index, const struct BMeshCreateParams *params)
+{
+ return BKE_mesh_to_bmesh_ex(
+ me, params,
+ &(struct BMeshFromMeshParams){
+ .calc_face_normal = false,
+ .add_key_index = add_key_index,
+ .use_shapekey = true,
+ .active_shapekey = ob->shapenr,
+ });
+}
+
+Mesh *BKE_bmesh_to_mesh_nomain(BMesh *bm, const struct BMeshToMeshParams *params)
+{
++ BLI_assert(params->calc_object_remap == false);
+ Mesh *mesh = BKE_id_new_nomain(ID_ME, NULL);
- BM_mesh_bm_to_me(bm, mesh, params);
++ BM_mesh_bm_to_me(NULL, bm, mesh, params);
+ return mesh;
+}
+
void BKE_mesh_make_local(Main *bmain, Mesh *me, const bool lib_local)
{
BKE_id_make_local_generic(bmain, &me->id, true, lib_local);
diff --cc source/blender/editors/mesh/editmesh_utils.c
index bbc9471638d,e1303b14f0e..e18758a5a58
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@@ -43,6 -43,8 +43,7 @@@
#include "BKE_DerivedMesh.h"
#include "BKE_context.h"
-#include "BKE_depsgraph.h"
+ #include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_report.h"
@@@ -328,9 -324,9 +329,9 @@@ void EDBM_mesh_make(Object *ob, const i
/**
* \warning This can invalidate the #DerivedMesh cache of other objects (for linked duplicates).
- * Most callers should run #DAG_id_tag_update on \a ob->data, see: T46738, T46913
+ * 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;
diff --cc source/blender/editors/mesh/mesh_data.c
index d2410c7d97b,fc74397010c..46b84f328cc
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@@ -577,8 -602,10 +578,8 @@@ static int drop_named_image_invoke(bCon
if (me->edit_btmesh == NULL)
return OPERATOR_CANCELLED;
- ED_uvedit_assign_image(bmain, scene, obedit, ima, NULL);
-
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;
diff --cc source/blender/editors/object/object_hook.c
index 0ce12944321,94ec8755616..6a3cb9aa097
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@@ -318,10 -315,10 +318,10 @@@ static bool object_hook_index_array(Mai
BMEditMesh *em;
- EDBM_mesh_load(obedit);
+ EDBM_mesh_load(bmain, obedit);
EDBM_mesh_make(obedit, scene->toolsettings->selectmode, true);
- DAG_id_tag_update(obedit->data, 0);
+ DEG_id_tag_update(obedit->data, 0);
em = me->edit_btmesh;
diff --cc source/blender/editors/object/object_relations.c
index 84e3e63fede,8abbb535981..a114b2cc6d5
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@@ -145,10 -139,10 +145,10 @@@ static int vertex_parent_set_exec(bCont
Mesh *me = obedit->data;
BMEditMesh *em;
- EDBM_mesh_load(obedit);
+ EDBM_mesh_load(bmain, obedit);
EDBM_mesh_make(obedit, scene->toolsettings->selectmode, true);
- DAG_id_tag_update(obedit->data, 0);
+ DEG_id_tag_update(obedit->data, 0);
em = me->edit_btmesh;
diff --cc source/blender/makesrna/intern/rna_object.c
index f74651f35f2,87c9291af8d..a9b87ea0703
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@@ -278,10 -273,10 +278,10 @@@ static void rna_Object_active_shape_upd
/* exit/enter editmode to get new shape */
switch (ob->type) {
case OB_MESH:
- EDBM_mesh_load(ob);
+ EDBM_mesh_load(bmain, ob);
EDBM_mesh_make(ob, scene->toolsettings->selectmode, true);
- DAG_id_tag_update(ob->data, 0);
+ DEG_id_tag_update(ob->data, 0);
EDBM_mesh_normals_update(((Mesh *)ob->data)->edit_btmesh);
BKE_editmesh_tessface_calc(((Mesh *)ob->data)->edit_btmesh);
diff --cc source/blender/modifiers/intern/MOD_edgesplit.c
index e8ffddbde4e,a0d717f1c0f..e1806dc8283
--- a/source/blender/modifiers/intern/MOD_edgesplit.c
+++ b/source/blender/modifiers/intern/MOD_edgesplit.c
@@@ -107,11 -96,10 +107,10 @@@ static Mesh *doEdgeSplit(Mesh *mesh, Ed
/* BM_mesh_validate(bm); */ /* for troubleshooting */
- result = BKE_id_new_nomain(ID_ME, mesh->id.name);
- BM_mesh_bm_to_me(bm, result, &((struct BMeshToMeshParams){0}));
- result = CDDM_from_bmesh(bm, true);
++ result = BKE_bmesh_to_mesh_nomain(bm, &((struct BMeshToMeshParams){0}));
BM_mesh_free(bm);
- result->dirty |= DM_DIRTY_NORMALS;
+ result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
return result;
}
diff --cc source/blender/python/bmesh/bmesh_py_types.c
index c6a67a1b2dd,07c255c4abe..c2d159538cb
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@@ -34,11 -34,11 +34,12 @@@
#include "DNA_object_types.h"
#include "DNA_material_types.h"
-#include "BKE_depsgraph.h"
#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
+ #include "BKE_global.h"
+#include "DEG_depsgraph.h"
+
#include "bmesh.h"
#include <Python.h>
@@@ -902,7 -902,11 +903,8 @@@ static PyObject *bpy_bmesh_to_mesh(BPy_
bm = self->bm;
- /* python won't ensure matching uv/mtex */
- BM_mesh_cd_validate(bm);
-
BM_mesh_bm_to_me(
+ G.main, /* XXX UGLY! */
bm, me,
(&(struct BMeshToMeshParams){
.calc_object_remap = true,
More information about the Bf-blender-cvs
mailing list