Merge branch 'master' into blender2.8
[blender.git] / source / blender / python / bmesh / bmesh_py_types.c
index c6a67a1..c2d1595 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "BKE_customdata.h"
 #include "BKE_DerivedMesh.h"
+#include "BKE_global.h"
 
 #include "DEG_depsgraph.h"
 
@@ -903,6 +904,7 @@ static PyObject *bpy_bmesh_to_mesh(BPy_BMesh *self, PyObject *args)
        bm = self->bm;
 
        BM_mesh_bm_to_me(
+               G.main,  /* XXX UGLY! */
                bm, me,
                (&(struct BMeshToMeshParams){
                    .calc_object_remap = true,