Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-10-13 12:55:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-10-13 12:55:11 +0400
commit8f25c0a799ae19edab0eee928b9130b5017e1a74 (patch)
treeb18b01cfed08ce91241ec4dc5cb8162df8b56996 /source
parent4063c230af188167d0b8471d5700fe060c8420f6 (diff)
moving textures up and down didnt move the material flag, made editmesh skin Ctrl+Alt+F
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/mesh/mesh_ops.c1
-rw-r--r--source/blender/editors/render/render_shading.c20
2 files changed, 21 insertions, 0 deletions
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<<act);
+ ma->septex &= ~(1<<act);
+ ma->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<<act);
+ ma->septex &= ~(1<<act);
+ ma->septex |= (ma->septex & (1<<(act+1))) >> 1;
+ ma->septex &= ~(1<<(act+1));
+ ma->septex |= mtexuse << 1;
+ }
+
set_active_mtex(id, act+1);
}
}