Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-26 08:17:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-26 08:17:41 +0400
commitc0c9f5386bac539e3824a5a97bd2243484598594 (patch)
treee1b40ad75e51f7c76707b7506312a11339742f4e /source/blender/python/bmesh/bmesh_py_api.c
parent7d608452d0c10da9b71ca37cb3bdbdfe0e5ebe36 (diff)
fix [#35507] BMesh module: Crash on to_mesh() if faces.layers.tex is used but no loops.layers.uv
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_api.c')
-rw-r--r--source/blender/python/bmesh/bmesh_py_api.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c
index 99fd3429973..c7b10d0aa4b 100644
--- a/source/blender/python/bmesh/bmesh_py_api.c
+++ b/source/blender/python/bmesh/bmesh_py_api.c
@@ -138,6 +138,12 @@ static PyObject *bpy_bm_update_edit_mesh(PyObject *UNUSED(self), PyObject *args,
{
extern void EDBM_update_generic(BMEditMesh *em, const bool do_tessface, const bool is_destructive);
+ BMEditMesh *em = me->edit_btmesh;
+ BMesh *bm = em->bm;
+
+ /* python won't ensure matching uv/mtex */
+ BM_mesh_cd_validate(bm);
+
EDBM_update_generic(me->edit_btmesh, do_tessface, is_destructive);
}