diff options
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index faaa2aecb4c..cf5aecc40f3 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -34,10 +34,11 @@ #include "DNA_object_types.h" #include "DNA_material_types.h" -#include "BKE_depsgraph.h" #include "BKE_customdata.h" #include "BKE_DerivedMesh.h" +#include "DEG_depsgraph.h" + #include "bmesh.h" #include <Python.h> @@ -901,14 +902,11 @@ static PyObject *bpy_bmesh_to_mesh(BPy_BMesh *self, PyObject *args) bm = self->bm; - /* python won't ensure matching uv/mtex */ - BM_mesh_cd_validate(bm); - BM_mesh_bm_to_me(bm, me, (&(struct BMeshToMeshParams){0})); /* we could have the user do this but if they forget blender can easy crash * since the references arrays for the objects derived meshes are now invalid */ - DAG_id_tag_update(&me->id, OB_RECALC_DATA); + DEG_id_tag_update(&me->id, OB_RECALC_DATA); Py_RETURN_NONE; } @@ -931,6 +929,8 @@ PyDoc_STRVAR(bpy_bmesh_from_object_doc, ); static PyObject *bpy_bmesh_from_object(BPy_BMesh *self, PyObject *args, PyObject *kw) { + /* TODO: This doesn't work currently because of eval_ctx. */ +#if 0 static const char *kwlist[] = {"object", "scene", "deform", "render", "cage", "face_normals", NULL}; PyObject *py_object; PyObject *py_scene; @@ -1023,6 +1023,10 @@ static PyObject *bpy_bmesh_from_object(BPy_BMesh *self, PyObject *args, PyObject dm->release(dm); Py_RETURN_NONE; +#else + UNUSED_VARS(self, args, kw); +#endif + return NULL; } |