diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-21 05:40:04 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-21 05:40:04 +0400 |
commit | 69289c978eace478bf992517473960d540895815 (patch) | |
tree | 493d2c9bec32f761468b082fbbb015c748b71685 /source/blender/editors/render/render_shading.c | |
parent | 5f093d6a5867a365900158fcca71296852787aac (diff) | |
parent | be674afdadaa1ab966147755e224e8bbda6807db (diff) |
Merged changes in the trunk up to revision 44266 (including BMesh).
Freestyle edge/face marks were ported to BMesh.
Conflicts resolved:
source/blender/editors/mesh/editface.c
source/blender/editors/space_view3d/drawobject.c
source/blender/makesdna/DNA_meshdata_types.h
source/blender/blenkernel/intern/editderivedmesh.c
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index f31777857b1..5e0f4629e11 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -63,6 +63,7 @@ #include "BKE_scene.h" #include "BKE_texture.h" #include "BKE_world.h" +#include "BKE_tessmesh.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" @@ -168,13 +169,15 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op)) if(ob && ob->actcol>0) { if(ob->type == OB_MESH) { - EditMesh *em= ((Mesh*)ob->data)->edit_mesh; - EditFace *efa; + BMEditMesh *em= ((Mesh*)ob->data)->edit_btmesh; + BMFace *efa; + BMIter iter; if(em) { - for(efa= em->faces.first; efa; efa=efa->next) - if(efa->f & SELECT) + BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) { + if(BM_elem_flag_test(efa, BM_ELEM_SELECT)) efa->mat_nr= ob->actcol-1; + } } } else if(ELEM(ob->type, OB_CURVE, OB_SURF)) { @@ -227,13 +230,10 @@ static int material_slot_de_select(bContext *C, int select) return OPERATOR_CANCELLED; if(ob->type == OB_MESH) { - EditMesh *em= ((Mesh*)ob->data)->edit_mesh; + BMEditMesh *em= ((Mesh*)ob->data)->edit_btmesh; if(em) { - if(select) - EM_select_by_material(em, ob->actcol-1); - else - EM_deselect_by_material(em, ob->actcol-1); + EDBM_deselect_by_material(em, ob->actcol-1, select); } } else if ELEM(ob->type, OB_CURVE, OB_SURF) { |