From 8f25c0a799ae19edab0eee928b9130b5017e1a74 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 13 Oct 2009 08:55:11 +0000 Subject: moving textures up and down didnt move the material flag, made editmesh skin Ctrl+Alt+F --- source/blender/editors/mesh/mesh_ops.c | 1 + source/blender/editors/render/render_shading.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'source') diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index eaaf76d7bc7..8c24dda4da7 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -258,6 +258,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) /* add/remove */ WM_keymap_add_item(keymap, "MESH_OT_edge_face_add", FKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "MESH_OT_skin", FKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); /* python */ WM_keymap_add_item(keymap, "MESH_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0); kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", AKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 4a2c88f54a7..a9023194271 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -697,6 +697,16 @@ static int texture_slot_move(bContext *C, wmOperator *op) mtexswap = mtex_ar[act]; mtex_ar[act] = mtex_ar[act-1]; mtex_ar[act-1] = mtexswap; + + if(GS(id->name)==ID_MA) { + Material *ma= (Material *)id; + int mtexuse = ma->septex & (1<septex &= ~(1<septex |= (ma->septex & (1<<(act-1))) << 1; + ma->septex &= ~(1<<(act-1)); + ma->septex |= mtexuse >> 1; + } + set_active_mtex(id, act-1); } } @@ -705,6 +715,16 @@ static int texture_slot_move(bContext *C, wmOperator *op) mtexswap = mtex_ar[act]; mtex_ar[act] = mtex_ar[act+1]; mtex_ar[act+1] = mtexswap; + + if(GS(id->name)==ID_MA) { + Material *ma= (Material *)id; + int mtexuse = ma->septex & (1<septex &= ~(1<septex |= (ma->septex & (1<<(act+1))) >> 1; + ma->septex &= ~(1<<(act+1)); + ma->septex |= mtexuse << 1; + } + set_active_mtex(id, act+1); } } -- cgit v1.2.3