diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-27 22:10:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-27 22:10:36 +0400 |
commit | d2d0866cff8a56ce3515d822d61ad40ce27180da (patch) | |
tree | a9a673efe915f25afa87eedf3b3b50cf0a931ce4 /source/blender/editors | |
parent | a11cd2bd2142f1481a204e9f7ab55bead3952582 (diff) |
view3d buttons, internal change: make act_vert_def vertex argument optional.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_buttons.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index e5ebe70020e..9896ffa6bb6 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -785,14 +785,14 @@ static void act_vert_def(Object *ob, BMVert **r_eve, MDeformVert **r_dvert) BMEditSelection *ese = (BMEditSelection *)em->bm->selected.last; if (ese && ese->htype == BM_VERT) { - *r_eve = (BMVert *)ese->ele; + if (r_eve) *r_eve = (BMVert *)ese->ele; *r_dvert = BM_ELEM_CD_GET_VOID_P(*r_eve, cd_dvert_offset); return; } } } - *r_eve = NULL; + if (r_eve) *r_eve = NULL; *r_dvert = NULL; } @@ -982,10 +982,9 @@ static int view3d_panel_vgroup_poll(const bContext *C, PanelType *UNUSED(pt)) { Scene *scene = CTX_data_scene(C); Object *ob = OBACT; - BMVert *eve_act; MDeformVert *dvert_act; - act_vert_def(ob, &eve_act, &dvert_act); + act_vert_def(ob, NULL, &dvert_act); return dvert_act ? dvert_act->totweight : 0; } @@ -997,10 +996,9 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa) Scene *scene = CTX_data_scene(C); Object *ob = OBACT; - BMVert *eve; MDeformVert *dv; - act_vert_def(ob, &eve, &dv); + act_vert_def(ob, NULL, &dv); if (dv && dv->totweight) { uiLayout *col; |