Bugfix #25870
authorTon Roosendaal <ton@blender.org>
Sun, 30 Jan 2011 16:19:08 +0000 (16:19 +0000)
committerTon Roosendaal <ton@blender.org>
Sun, 30 Jan 2011 16:19:08 +0000 (16:19 +0000)
Operator "Select linked flat faces" didn't initialize the default
angle. That made it fail being called via menus.

source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/mesh_ops.c

index 818f92c73c69f2479fc486a3122f4097eeeeb8da..6488dc17fb4d7c606191a91e4596c6c7beada8dd 100644 (file)
@@ -3220,7 +3220,7 @@ void MESH_OT_faces_select_linked_flat(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* props */
-       RNA_def_float(ot->srna, "sharpness", 0.0f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f);
+       RNA_def_float(ot->srna, "sharpness", 135.0f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f);
 }
 
 void select_non_manifold(EditMesh *em, wmOperator *op )
index b2cb3e06de36279377e31efd3eb77c819ddd0cee..e0a91048a2c3437cdd1102f37ca9ca484eb1e3a9 100644 (file)
@@ -247,7 +247,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
        RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1);
        
-       RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_faces_select_linked_flat", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0);
+       WM_keymap_add_item(keymap, "MESH_OT_faces_select_linked_flat", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0);
 
        WM_keymap_add_item(keymap, "MESH_OT_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0);