diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-14 08:46:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-14 08:46:12 +0400 |
commit | f15c15e992a9836a7295166af275522690ada315 (patch) | |
tree | ceab2edb87f3b2d1a8b05a661134f4a2696496a6 /source/blender/bmesh/intern | |
parent | 99f72dfbfcb004418ae3c701f3badfd36996e6e5 (diff) |
bmesh py api: finished todo - editable select_history
eg:
bm.select_history = vert, face, edge
bm.select_history.add(edge)
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 14 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.h | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index 4108d00fe7a..89bce16f2ca 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -720,14 +720,18 @@ void BM_select_history_clear(BMesh *bm) bm->selected.first = bm->selected.last = NULL; } +void BM_select_history_store_notest(BMesh *bm, BMElem *ele) +{ + BMEditSelection *ese = (BMEditSelection *) MEM_callocN(sizeof(BMEditSelection), "BMEdit Selection"); + ese->htype = ((BMHeader *)ele)->htype; + ese->ele = ele; + BLI_addtail(&(bm->selected), ese); +} + void BM_select_history_store(BMesh *bm, BMElem *ele) { - BMEditSelection *ese; if (!BM_select_history_check(bm, ele)) { - ese = (BMEditSelection *) MEM_callocN(sizeof(BMEditSelection), "BMEdit Selection"); - ese->htype = ((BMHeader *)ele)->htype; - ese->ele = ele; - BLI_addtail(&(bm->selected), ese); + BM_select_history_store_notest(bm, ele); } } diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h index 8e4a4ab7d66..f0e81b1dd9f 100644 --- a/source/blender/bmesh/intern/bmesh_marking.h +++ b/source/blender/bmesh/intern/bmesh_marking.h @@ -71,6 +71,7 @@ void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese); int BM_select_history_check(BMesh *bm, const BMElem *ele); int BM_select_history_remove(BMesh *bm, BMElem *ele); +void BM_select_history_store_notest(BMesh *bm, BMElem *ele); void BM_select_history_store(BMesh *bm, BMElem *ele); void BM_select_history_validate(BMesh *bm); void BM_select_history_clear(BMesh *em); |