diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-11 09:58:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-11 09:58:22 +0400 |
commit | 7fa7e4ba1faf7a122f99a683c04935e01725061c (patch) | |
tree | 7d55eacad074fd83c744de19cae006a7d9f86eac /source/blender/python/bmesh/bmesh_py_types.h | |
parent | 050439fd9dcf3b7e79bae1fd409364cb1220e598 (diff) |
bmesh python api additions:
- BMesh.is_wrapped
- BMesh.copy()
- BMesh.clear()
- BMesh.free()
- BMesh.from_object(obj, apply_modifiers=True)
- BMEdge.calc_length()
- BMLoop.calc_normal()
- BMLoop.calc_tangent()
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types.h')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.h b/source/blender/python/bmesh/bmesh_py_types.h index 88569c5eeaf..b5b96002ccc 100644 --- a/source/blender/python/bmesh/bmesh_py_types.h +++ b/source/blender/python/bmesh/bmesh_py_types.h @@ -62,7 +62,7 @@ typedef struct BPy_BMElem { typedef struct BPy_BMesh { PyObject_VAR_HEAD struct BMesh *bm; /* keep first */ - char py_owns; /* when set, free along with the PyObject */ + int flag; } BPy_BMesh; /* element types */ @@ -120,7 +120,12 @@ void BPy_BM_init_types(void); PyObject *BPyInit_bmesh_types(void); -PyObject *BPy_BMesh_CreatePyObject(BMesh *bm); +enum { + BPY_BMFLAG_NOP = 0, /* do nothing */ + BPY_BMFLAG_IS_WRAPPED = 1 /* the mesh is owned by editmode */ +}; + +PyObject *BPy_BMesh_CreatePyObject(BMesh *bm, int flag); PyObject *BPy_BMVert_CreatePyObject(BMesh *bm, BMVert *v); PyObject *BPy_BMEdge_CreatePyObject(BMesh *bm, BMEdge *e); PyObject *BPy_BMFace_CreatePyObject(BMesh *bm, BMFace *f); |