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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-22 12:37:47 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-22 12:37:47 +0300
commitcbf5c738d6edaa3e5feecab6a97327cbfd96e06e (patch)
treeea06760f7501bf735d9a6dc6c8242da59f3db671 /source/blender/python/bmesh
parent1870a1adc75dece1e9eac3aa632da6e903780c86 (diff)
Cleanup: get rid of last G.main's in bpy area.
Essentially 'validating' them as G_MAIN, and adding some asserts in dubious places, that handled IDs are actually in G_MAIN.
Diffstat (limited to 'source/blender/python/bmesh')
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index 2c5fd4e7bf7..e8474efa31f 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -38,6 +38,7 @@
#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
#include "BKE_global.h"
+#include "BKE_library.h"
#include "bmesh.h"
@@ -905,8 +906,9 @@ static PyObject *bpy_bmesh_to_mesh(BPy_BMesh *self, PyObject *args)
/* python won't ensure matching uv/mtex */
BM_mesh_cd_validate(bm);
+ BLI_assert(BKE_id_is_in_gobal_main(&me->id));
BM_mesh_bm_to_me(
- G.main, /* XXX UGLY! */
+ G_MAIN, /* XXX UGLY! */
bm, me,
(&(struct BMeshToMeshParams){
.calc_object_remap = true,