diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-12 18:35:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-12 18:35:10 +0400 |
commit | 67e27685709a050d92d7e8a0463006f0b4d46ef1 (patch) | |
tree | 55fc394470a3ea8390dc5bc201a8f4cc1f630216 /source/blender/editors/space_view3d | |
parent | d4ed5ab92a80cc953947e25262591d8c5f39fcd5 (diff) |
quiet some -Wshadow warnings
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_buttons.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index e4c21a9c2c8..cded7bbbdfc 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -533,8 +533,7 @@ static void update_tface_color_layer(DerivedMesh *dm) } else { float col[3]; - Material *ma = give_current_material(Gtexdraw.ob, mface[i].mat_nr + 1); - + if (ma) { if (Gtexdraw.color_profile) linearrgb_to_srgb_v3_v3(col, &ma->r); else copy_v3_v3(col, &ma->r); diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 1f7bae0b23e..0a55df192ea 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -158,7 +158,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float TransformProperties *tfp; float median[NBR_TRANSFORM_PROPERTIES], ve_median[NBR_TRANSFORM_PROPERTIES]; int tot, totedgedata, totcurvedata, totlattdata, totskinradius, totcurvebweight; - int meshdata = FALSE, i; + int meshdata = FALSE; char defstr[320]; PointerRNA data_ptr; @@ -470,6 +470,8 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float } else { /* apply */ + int i; + memcpy(ve_median, tfp->ve_median, sizeof(tfp->ve_median)); if (v3d->flag & V3D_GLOBAL_STATS) { @@ -485,10 +487,10 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float Mesh *me = ob->data; BMEditMesh *em = me->edit_btmesh; BMesh *bm = em->bm; - BMVert *eve; BMIter iter; if (len_v3(&median[LOC_X]) > 0.000001f) { + BMVert *eve; BM_ITER_MESH (eve, &iter, bm, BM_VERTS_OF_MESH) { if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) { diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index dc3cfa41e37..a111799a27c 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2014,12 +2014,10 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i } if (bone_selected) { - Object *ob = base->object; - - if (ob && (ob->type == OB_ARMATURE)) { - bArmature *arm = ob->data; + if (base->object && (base->object->type == OB_ARMATURE)) { + bArmature *arm = base->object->data; - WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, base->object); if (arm && (arm->flag & ARM_HAS_VIZ_DEPS)) { /* mask modifier ('armature' mode), etc. */ |