moving textures up and down didnt move the material flag, made editmesh skin Ctrl...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 13 Oct 2009 08:55:11 +0000 (08:55 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 13 Oct 2009 08:55:11 +0000 (08:55 +0000)
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/render/render_shading.c

index eaaf76d7bc7bcdd2f888231e0fe6bd425a6cf721..8c24dda4da7faa7c782ccd13ec34e40b867e3b01 100644 (file)
@@ -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);
index 4a2c88f54a701111a5b853b4772835470c9d25c0..a90231942711112365bcfb17e612dd830e72ce77 100644 (file)
@@ -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);
                        }
                }