diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-23 08:24:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-23 08:24:11 +0400 |
commit | 8baa5fbde21f55a2e8cfa5f515767e00038fca78 (patch) | |
tree | fce58ed9a7086e98a05add5926ccd6ae9641111d /source | |
parent | b51590d55df4b013a0becf9977eddb33206276ba (diff) |
- fix for python freeing its own bmesh clearing the global mirror cache.
- fix for own mistake (Ctrl+T didnt set beauty peroperty).
- remove bad level includes in bmesh.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/bmesh/SConscript | 6 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.c | 8 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.h | 7 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_polygon.c | 1 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_primitive.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_subdivide.c | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 5 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 19 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_ops.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer_api.c | 3 |
12 files changed, 26 insertions, 36 deletions
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt index 016d2802094..1cf2b9113b2 100644 --- a/source/blender/bmesh/CMakeLists.txt +++ b/source/blender/bmesh/CMakeLists.txt @@ -28,7 +28,6 @@ set(INC . ../blenkernel ../blenlib - ../editors/include ../makesdna ../../../intern/guardedalloc ) diff --git a/source/blender/bmesh/SConscript b/source/blender/bmesh/SConscript index e06f43bd85d..fb00aef4d78 100644 --- a/source/blender/bmesh/SConscript +++ b/source/blender/bmesh/SConscript @@ -8,13 +8,11 @@ sources += env.Glob('operators/*.c') sources += env.Glob('tools/*.c') incs = [ - '#/intern/guardedalloc', + './', '../blenlib', - '../blenloader', '../makesdna', '../blenkernel', - './', - '../editors/include', + '#/intern/guardedalloc', ] defs = [] diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 6c208b46244..bd6eb7ae149 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -39,8 +39,6 @@ #include "BKE_tessmesh.h" #include "BKE_multires.h" -#include "ED_mesh.h" - #include "intern/bmesh_private.h" /* used as an extern, defined in bmesh.h */ @@ -142,12 +140,6 @@ void BM_mesh_data_free(BMesh *bm) BLI_mempool_destroy(bm->looplistpool); #endif - /* These tables aren't used yet, so it's not strictly necessary - * to 'end' them (with 'e' param) but if someone tries to start - * using them, having these in place will save a lot of pain */ - mesh_octree_table(NULL, NULL, NULL, 'e'); - mesh_mirrtopo_table(NULL, 'e'); - BLI_freelistN(&bm->selected); BMO_error_clear(bm); diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index 52e2018eeef..f4db13e2777 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -39,6 +39,13 @@ enum { SUBD_STRAIGHT_CUT }; +enum { + SUBDIV_SELECT_ORIG, + SUBDIV_SELECT_INNER, + SUBDIV_SELECT_INNER_SEL, + SUBDIV_SELECT_LOOPCUT +}; + /* similar face selection slot values */ enum { SIMFACE_MATERIAL = 201, diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 2e41d4b923c..fbfc253c364 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -445,6 +445,7 @@ void BM_face_normal_update_vcos(BMesh *bm, BMFace *f, float no[3], /* must have valid index data */ BLI_assert((bm->elem_index_dirty & BM_VERT) == 0); + (void)bm; /* common cases first */ switch (f->len) { diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index fc0e34cf2f6..6fd3c8ce99c 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -28,8 +28,6 @@ #include "BLI_math.h" -#include "ED_mesh.h" - #include "bmesh.h" #include "intern/bmesh_private.h" diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index 2f198992eb6..d5f46ebfc85 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -35,8 +35,6 @@ #include "DNA_object_types.h" -#include "ED_mesh.h" - #include "bmesh.h" #include "intern/bmesh_private.h" diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 6a6da0cfa26..10137a5a259 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -271,11 +271,6 @@ void ED_mesh_mirrtopo_init(struct Mesh *me, const int ob_mode, MirrTopoStore_t * const short skip_em_vert_array_init); void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store); -#define SUBDIV_SELECT_ORIG 0 -#define SUBDIV_SELECT_INNER 1 -#define SUBDIV_SELECT_INNER_SEL 2 -#define SUBDIV_SELECT_LOOPCUT 3 - #ifdef __cplusplus } #endif diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 468f5699bce..074c37850f7 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -150,7 +150,7 @@ int EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int r BKE_report(op->reports, RPT_ERROR, errmsg); } - BMEdit_Free(em); + EDBM_mesh_free(em); *em = *emcopy; MEM_freeN(emcopy); @@ -284,7 +284,7 @@ void EDBM_mesh_make(ToolSettings *ts, Scene *UNUSED(scene), Object *ob) if (me->edit_btmesh) { /* this happens when switching shape keys */ - BMEdit_Free(me->edit_btmesh); + EDBM_mesh_free(me->edit_btmesh); MEM_freeN(me->edit_btmesh); } @@ -315,9 +315,18 @@ void EDBM_mesh_load(Object *ob) #endif } -void EDBM_mesh_free(BMEditMesh *tm) +/** + * Should only be called on the active editmesh, otherwise call #BMEdit_Free + */ +void EDBM_mesh_free(BMEditMesh *em) { - BMEdit_Free(tm); + /* These tables aren't used yet, so it's not strictly necessary + * to 'end' them (with 'e' param) but if someone tries to start + * using them, having these in place will save a lot of pain */ + mesh_octree_table(NULL, NULL, NULL, 'e'); + mesh_mirrtopo_table(NULL, 'e'); + + BMEdit_Free(em); } void EDBM_index_arrays_init(BMEditMesh *tm, int forvert, int foredge, int forface) @@ -547,7 +556,7 @@ static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata)) ob->shapenr = em->bm->shapenr; - BMEdit_Free(em); + EDBM_mesh_free(em); bm = BM_mesh_create(&bm_mesh_allocsize_default); diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 7e8c38c9abc..4b4fef53275 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -314,7 +314,8 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MESH_OT_fill", FKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "MESH_OT_beautify_fill", FKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0); - WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "use_beauty", TRUE); kmi = WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); RNA_boolean_set(kmi->ptr, "use_beauty", FALSE); diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 09e7d1d9be5..fb383b1256b 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -39,11 +39,6 @@ #include "DNA_object_types.h" #include "DNA_modifier_types.h" -/* #include "BLO_sys_types.h" *//* needed for intptr_t used in ED_mesh.h */ - -/* #include "ED_mesh.h" */ - - #ifdef RNA_RUNTIME #include "BLI_math.h" diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index e47ec23bef5..20ceaec8974 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -31,9 +31,6 @@ #include <string.h> #include "RNA_define.h" - -#include "BLO_sys_types.h" /* needed for intptr_t used in ED_mesh.h */ - #include "RNA_access.h" #include "RNA_define.h" |