made some mesh operator names and values more consistent with object mode + other...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 1 Feb 2009 12:40:27 +0000 (12:40 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 1 Feb 2009 12:40:27 +0000 (12:40 +0000)
- percentage -> percent, and always a float.
- renamed selectconnected to select_linked
- removed _mesh prefix for MESH_OT_* operators.
- renamed select_swap -> select_invert (matching object and sequencer operators)

source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/object/object_edit.c
source/blender/editors/space_view3d/view3d_header.c

index 3fdb362edc17a6bd0b7028541bdef9d370601ec2..dc13888eebd34a90a7c578fc14ee03e80c92cd7d 100644 (file)
@@ -2251,7 +2251,7 @@ void selectconnected_mesh_all(EditMesh *em)
 //     if (EM_texFaceCheck())
 }
 
-static int selectconnected_mesh_all_exec(bContext *C, wmOperator *op)
+static int select_linked_exec(bContext *C, wmOperator *op)
 {
        Object *obedit= CTX_data_edit_object(C);
        EditMesh *em= ((Mesh *)obedit->data)->edit_mesh;
@@ -2262,14 +2262,14 @@ static int selectconnected_mesh_all_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_selectconnected_mesh_all(wmOperatorType *ot)
+void MESH_OT_select_linked(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Select All of the Connected Mesh";
-       ot->idname= "MESH_OT_selectconnected_mesh_all";
+       ot->idname= "MESH_OT_select_linked";
        
        /* api callbacks */
-       ot->exec= selectconnected_mesh_all_exec;
+       ot->exec= select_linked_exec;
        ot->poll= ED_operator_editmesh;
        
        /* flags */
@@ -2280,7 +2280,7 @@ void MESH_OT_selectconnected_mesh_all(wmOperatorType *ot)
 /* *********** select connected ************* */
 
 // XXX should we use CTX_scene(C)->selectmode & SCE_SELECT_FACE like it was in the past ? calls selectconnected_delimit_mesh if true
-static int selectconnected_mesh_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        Object *obedit= CTX_data_edit_object(C);
        ViewContext vc;
@@ -2358,14 +2358,14 @@ static int selectconnected_mesh_invoke(bContext *C, wmOperator *op, wmEvent *eve
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_selectconnected_mesh(wmOperatorType *ot)
+void MESH_OT_select_linked_pick(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Select Connected Mesh";
-       ot->idname= "MESH_OT_selectconnected_mesh";
+       ot->idname= "MESH_OT_select_linked_pick";
        
        /* api callbacks */
-       ot->invoke= selectconnected_mesh_invoke;
+       ot->invoke= select_linked_pick_invoke;
        ot->poll= ED_operator_editmesh;
        
        /* flags */
@@ -2599,11 +2599,11 @@ static int hide_mesh_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_hide_mesh(wmOperatorType *ot)
+void MESH_OT_hide(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Hide vertice or Hide All of the Mesh";
-       ot->idname= "MESH_OT_hide_mesh";
+       ot->idname= "MESH_OT_hide";
        
        /* api callbacks */
        ot->exec= hide_mesh_exec;
@@ -2663,11 +2663,11 @@ static int reveal_mesh_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_reveal_mesh(wmOperatorType *ot)
+void MESH_OT_reveal(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Reveal the Mesh";
-       ot->idname= "MESH_OT_reveal_mesh";
+       ot->idname= "MESH_OT_reveal";
        
        /* api callbacks */
        ot->exec= reveal_mesh_exec;
@@ -3352,11 +3352,11 @@ static int selectswap_mesh_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_selectswap_mesh(wmOperatorType *ot)
+void MESH_OT_select_invert(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Select Swap";
-       ot->idname= "MESH_OT_selectswap_mesh";
+       ot->idname= "MESH_OT_select_invert";
        
        /* api callbacks */
        ot->exec= selectswap_mesh_exec;
@@ -3555,12 +3555,12 @@ void MESH_OT_select_less(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static void selectrandom_mesh(EditMesh *em, int randfac) /* randomly selects a user-set % of vertices/edges/faces */
+static void selectrandom_mesh(EditMesh *em, float perc) /* randomly selects a user-set % of vertices/edges/faces */
 {
        EditVert *eve;
        EditEdge *eed;
        EditFace *efa;
-
+       float randfac= perc/100.0f;
        /* Get the percentage of vertices to randomly select as 'randfac' */
 // XXX if(button(&randfac,0, 100,"Percentage:")==0) return;
 
@@ -3569,7 +3569,7 @@ static void selectrandom_mesh(EditMesh *em, int randfac) /* randomly selects a u
        if(em->selectmode & SCE_SELECT_VERTEX) {
                for(eve= em->verts.first; eve; eve= eve->next) {
                        if(eve->h==0) {
-                               if ( (BLI_frand() * 100) < randfac) 
+                               if (BLI_frand() < randfac) 
                                        eve->f |= SELECT;
                        }
                }
@@ -3578,7 +3578,7 @@ static void selectrandom_mesh(EditMesh *em, int randfac) /* randomly selects a u
        else if(em->selectmode & SCE_SELECT_EDGE) {
                for(eed= em->edges.first; eed; eed= eed->next) {
                        if(eed->h==0) {
-                               if ( (BLI_frand() * 100) < randfac) 
+                               if (BLI_frand() < randfac) 
                                        EM_select_edge(eed, 1);
                        }
                }
@@ -3587,7 +3587,7 @@ static void selectrandom_mesh(EditMesh *em, int randfac) /* randomly selects a u
        else {
                for(efa= em->faces.first; efa; efa= efa->next) {
                        if(efa->h==0) {
-                               if ( (BLI_frand() * 100) < randfac) 
+                               if (BLI_frand() < randfac) 
                                        EM_select_face(efa, 1);
                        }
                }
@@ -3597,35 +3597,33 @@ static void selectrandom_mesh(EditMesh *em, int randfac) /* randomly selects a u
 //     if (EM_texFaceCheck())
 }
 
-static int selectrandom_mesh_exec(bContext *C, wmOperator *op)
+static int mesh_select_random_exec(bContext *C, wmOperator *op)
 {
        Object *obedit= CTX_data_edit_object(C);
        EditMesh *em= ((Mesh *)obedit->data)->edit_mesh;
        
-       selectrandom_mesh(em, RNA_int_get(op->ptr,"percentage"));
+       selectrandom_mesh(em, RNA_float_get(op->ptr,"percent"));
                
        WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
        
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_selectrandom_mesh(wmOperatorType *ot)
+void MESH_OT_select_random(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name= "Select random mesh";
-       ot->idname= "MESH_OT_selectrandom_mesh";
-       
+       ot->name= "Select Random";
+       ot->idname= "MESH_OT_select_random";
+
        /* api callbacks */
-       ot->exec= selectrandom_mesh_exec;
+       ot->exec= mesh_select_random_exec;
        ot->poll= ED_operator_editmesh;
 
        /* flags */
        ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
        
        /* props */
-
-       
-       RNA_def_int(ot->srna, "percentage", 50, 0, 100, "Percentage", "", 0, 100);
+       RNA_def_float(ot->srna, "percent", 50.0f, 0.0f, 100.0f, "Percent", "percentage of mesh data to randomly select", 0.01f, 100.0f);
 }
 
 void editmesh_select_by_material(EditMesh *em, int index) 
@@ -3706,11 +3704,11 @@ static int mesh_selection_type_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void MESH_OT_mesh_selection_type(wmOperatorType *ot)
+void MESH_OT_selection_type(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Selection Mode";
-       ot->idname= "MESH_OT_mesh_selection_type";
+       ot->idname= "MESH_OT_selection_type";
        
        /* api callbacks */
        ot->invoke= WM_menu_invoke;
@@ -4538,7 +4536,7 @@ void vertexnoise(Object *obedit, EditMesh *em)
 
 }
 
-void vertices_to_sphere(Scene *scene, View3D *v3d, Object *obedit, EditMesh *em, int perc)
+static void vertices_to_sphere(Scene *scene, View3D *v3d, Object *obedit, EditMesh *em, float perc)
 {
        EditVert *eve;
        float *curs, len, vec[3], cent[3], fac, facm, imat[3][3], bmat[3][3];
@@ -4546,8 +4544,8 @@ void vertices_to_sphere(Scene *scene, View3D *v3d, Object *obedit, EditMesh *em,
        
 // XXX if(button(&perc, 1, 100, "Percentage:")==0) return;
        
-       fac= perc/100.0;
-       facm= 1.0-fac;
+       fac= perc/100.0f;
+       facm= 1.0f-fac;
        
        Mat3CpyMat4(bmat, obedit->obmat);
        Mat3Inv(imat, bmat);
@@ -4602,7 +4600,7 @@ static int vertices_to_sphere_exec(bContext *C, wmOperator *op)
        Scene *scene = CTX_data_scene(C);
        EditMesh *em= ((Mesh *)obedit->data)->edit_mesh;
        
-       vertices_to_sphere(scene, v3d, obedit, em, RNA_int_get(op->ptr,"percentage"));
+       vertices_to_sphere(scene, v3d, obedit, em, RNA_float_get(op->ptr,"percent"));
                
        WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
        
@@ -4623,7 +4621,5 @@ void MESH_OT_vertices_to_sphere(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
        
        /* props */
-
-       
-       RNA_def_int(ot->srna, "percentage", 100, 0, 100, "Percentage", "", 0, 100);
+       RNA_def_float(ot->srna, "percent", 100.0f, 0.0f, 100.0f, "Percent", "DOC_BROKEN", 0.01f, 100.0f);
 }
index d5b970e2eaca02122731b4e4c58204351bd5588f..805081b6a6ff4e523ab938030ddcf1e2e89a5236 100644 (file)
@@ -691,7 +691,7 @@ void extrude_mesh(Object *obedit, EditMesh *em)
 }
 
 // XXX should be a menu item
-static int extrude_mesh_exec(bContext *C, wmOperator *op)
+static int mesh_extrude_exec(bContext *C, wmOperator *op)
 {
        Object *obedit= CTX_data_edit_object(C);
        EditMesh *em= ((Mesh *)obedit->data)->edit_mesh;
@@ -703,14 +703,14 @@ static int extrude_mesh_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_extrude_mesh(wmOperatorType *ot)
+void MESH_OT_extrude(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Extrude Mesh";
-       ot->idname= "MESH_OT_extrude_mesh";
+       ot->idname= "MESH_OT_extrude";
        
        /* api callbacks */
-       ot->exec= extrude_mesh_exec;
+       ot->exec= mesh_extrude_exec;
        ot->poll= ED_operator_editmesh;
        
        /* flags */
@@ -1120,11 +1120,11 @@ static int delete_mesh_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void MESH_OT_delete_mesh(wmOperatorType *ot)
+void MESH_OT_delete(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Delete Mesh";
-       ot->idname= "MESH_OT_delete_mesh";
+       ot->idname= "MESH_OT_delete";
        
        /* api callbacks */
        ot->invoke= WM_menu_invoke;
@@ -6552,11 +6552,11 @@ static int fill_mesh_exec(bContext *C, wmOperator *op)
        
 }
 
-void MESH_OT_fill_mesh(wmOperatorType *ot)
+void MESH_OT_fill(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Fill Mesh";
-       ot->idname= "MESH_OT_fill_mesh";
+       ot->idname= "MESH_OT_fill";
        
        /* api callbacks */
        ot->exec= fill_mesh_exec;
index 22b7c67c13e057b2fdab045fcf389aa5cefc6a54..486576c71e2a2c1b6beea94aa6cad0ce5b621df8 100644 (file)
@@ -176,12 +176,12 @@ void MESH_OT_loop_select(struct wmOperatorType *ot);
 void MESH_OT_de_select_all(struct wmOperatorType *ot);
 void MESH_OT_select_more(struct wmOperatorType *ot);
 void MESH_OT_select_less(struct wmOperatorType *ot);
-void MESH_OT_selectswap_mesh(struct wmOperatorType *ot);
+void MESH_OT_select_invert(struct wmOperatorType *ot);
 void MESH_OT_select_non_manifold(struct wmOperatorType *ot);
-void MESH_OT_selectconnected_mesh_all(struct wmOperatorType *ot);
-void MESH_OT_selectconnected_mesh(struct wmOperatorType *ot);
-void MESH_OT_hide_mesh(struct wmOperatorType *ot);
-void MESH_OT_reveal_mesh(struct wmOperatorType *ot);
+void MESH_OT_select_linked(struct wmOperatorType *ot);
+void MESH_OT_select_linked_pick(struct wmOperatorType *ot);
+void MESH_OT_hide(struct wmOperatorType *ot);
+void MESH_OT_reveal(struct wmOperatorType *ot);
 void MESH_OT_consistant_normals(struct wmOperatorType *ot);
 void MESH_OT_select_linked_flat_faces(struct wmOperatorType *ot);
 void MESH_OT_select_sharp_edges(struct wmOperatorType *ot);
@@ -189,9 +189,9 @@ void MESH_OT_shortest_path_select(struct wmOperatorType *ot);
 void MESH_OT_similar_vertex_select(struct wmOperatorType *ot);
 void MESH_OT_similar_edge_select(struct wmOperatorType *ot);
 void MESH_OT_similar_face_select(struct wmOperatorType *ot);
-void MESH_OT_selectrandom_mesh(struct wmOperatorType *ot);
+void MESH_OT_select_random(struct wmOperatorType *ot);
 void MESH_OT_vertices_to_sphere(struct wmOperatorType *ot);
-void MESH_OT_mesh_selection_type(struct wmOperatorType *ot);
+void MESH_OT_selection_type(struct wmOperatorType *ot);
 
 extern EditEdge *findnearestedge(ViewContext *vc, int *dist);
 extern void EM_automerge(int update);
@@ -230,9 +230,9 @@ void MESH_OT_subdivide_multi(struct wmOperatorType *ot);
 void MESH_OT_subdivide_multi_fractal(struct wmOperatorType *ot);
 void MESH_OT_subdivide_smooth(struct wmOperatorType *ot);
 void MESH_OT_removedoublesflag(struct wmOperatorType *ot);
-void MESH_OT_extrude_mesh(struct wmOperatorType *ot);
+void MESH_OT_extrude(struct wmOperatorType *ot);
 
-void MESH_OT_fill_mesh(struct wmOperatorType *ot);
+void MESH_OT_fill(struct wmOperatorType *ot);
 void MESH_OT_beauty_fill(struct wmOperatorType *ot);
 void MESH_OT_convert_quads_to_tris(struct wmOperatorType *ot);
 void MESH_OT_convert_tris_to_quads(struct wmOperatorType *ot);
@@ -240,7 +240,7 @@ void MESH_OT_edge_flip(struct wmOperatorType *ot);
 void MESH_OT_faces_shade_smooth(struct wmOperatorType *ot);
 void MESH_OT_faces_shade_solid(struct wmOperatorType *ot);
 
-void MESH_OT_delete_mesh(struct wmOperatorType *ot);
+void MESH_OT_delete(struct wmOperatorType *ot);
 
 #endif // MESH_INTERN_H
 
index 74af4543cbcb51d945a4e80c7ec1915d9877611c..58ea1b750641cf1aec98bf4e346c67b09ee25ccf 100644 (file)
@@ -109,14 +109,14 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_de_select_all);
        WM_operatortype_append(MESH_OT_select_more);
        WM_operatortype_append(MESH_OT_select_less);
-       WM_operatortype_append(MESH_OT_selectswap_mesh);
+       WM_operatortype_append(MESH_OT_select_invert);
        WM_operatortype_append(MESH_OT_select_non_manifold);
-       WM_operatortype_append(MESH_OT_selectconnected_mesh_all);
-       WM_operatortype_append(MESH_OT_selectconnected_mesh);
-       WM_operatortype_append(MESH_OT_selectrandom_mesh);
-       WM_operatortype_append(MESH_OT_mesh_selection_type);
-       WM_operatortype_append(MESH_OT_hide_mesh);
-       WM_operatortype_append(MESH_OT_reveal_mesh);
+       WM_operatortype_append(MESH_OT_select_linked);
+       WM_operatortype_append(MESH_OT_select_linked_pick);
+       WM_operatortype_append(MESH_OT_select_random);
+       WM_operatortype_append(MESH_OT_selection_type);
+       WM_operatortype_append(MESH_OT_hide);
+       WM_operatortype_append(MESH_OT_reveal);
        WM_operatortype_append(MESH_OT_consistant_normals);
        WM_operatortype_append(MESH_OT_subdivide);
        WM_operatortype_append(MESH_OT_subdivide_multi);
@@ -139,10 +139,10 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_make_fgon);
        WM_operatortype_append(MESH_OT_add_duplicate);
        WM_operatortype_append(MESH_OT_removedoublesflag);
-       WM_operatortype_append(MESH_OT_extrude_mesh);
+       WM_operatortype_append(MESH_OT_extrude);
        WM_operatortype_append(MESH_OT_vertices_to_sphere);
 
-       WM_operatortype_append(MESH_OT_fill_mesh);
+       WM_operatortype_append(MESH_OT_fill);
        WM_operatortype_append(MESH_OT_beauty_fill);
        WM_operatortype_append(MESH_OT_convert_quads_to_tris);
        WM_operatortype_append(MESH_OT_convert_tris_to_quads);
@@ -150,7 +150,7 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_faces_shade_smooth);
        WM_operatortype_append(MESH_OT_faces_shade_solid);
 
-       WM_operatortype_append(MESH_OT_delete_mesh);
+       WM_operatortype_append(MESH_OT_delete);
 
        WM_operatortype_append(MESH_OT_separate);
        WM_operatortype_append(MESH_OT_dupli_extrude_cursor);
@@ -184,17 +184,17 @@ void ED_keymap_mesh(wmWindowManager *wm)
        WM_keymap_add_item(keymap, "MESH_OT_de_select_all", AKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "MESH_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "MESH_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "MESH_OT_selectswap_mesh", IKEY, KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_select_invert", IKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "MESH_OT_select_non_manifold", MKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0);
        
-       WM_keymap_add_item(keymap, "MESH_OT_selectconnected_mesh_all", LKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "MESH_OT_selectconnected_mesh", LKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_selectconnected_mesh", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1);
+       WM_keymap_add_item(keymap, "MESH_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
+       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_select_linked_flat_faces", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0);
        RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_select_sharp_edges", SKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0);
        
-       WM_keymap_add_item(keymap, "MESH_OT_selectrandom_mesh", SPACEKEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_select_random", SPACEKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "MESH_OT_vertices_to_sphere", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT , 0);
        
        /* temp hotkeys! */
@@ -204,15 +204,15 @@ void ED_keymap_mesh(wmWindowManager *wm)
        
        /* selection mode */
        
-       WM_keymap_add_item(keymap, "MESH_OT_mesh_selection_type", TABKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_selection_type", TABKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
        
        
        /* transform keymap already defined, so no tweaks for select */
        
        /* hide */
-       WM_keymap_add_item(keymap, "MESH_OT_hide_mesh", HKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_hide_mesh", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "swap", 1);
-       WM_keymap_add_item(keymap, "MESH_OT_reveal_mesh", HKEY, KM_PRESS, KM_ALT, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "swap", 1);
+       WM_keymap_add_item(keymap, "MESH_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
        
        /* tools */
        WM_keymap_add_item(keymap, "MESH_OT_consistant_normals", NKEY, KM_PRESS, KM_CTRL, 0);
@@ -223,10 +223,10 @@ void ED_keymap_mesh(wmWindowManager *wm)
        WM_keymap_add_item(keymap, "MESH_OT_subdivide_multi_fractal", WKEY, KM_PRESS, KM_ALT, 0);
        WM_keymap_add_item(keymap, "MESH_OT_subdivide_smooth", WKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);*/
        WM_keymap_add_item(keymap, "MESH_OT_removedoublesflag", VKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "MESH_OT_extrude_mesh", EKEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_extrude", EKEY, KM_PRESS, 0, 0);
        
        WM_keymap_add_item(keymap, "VIEW3D_OT_editmesh_face_toolbox", FKEY, KM_PRESS, KM_CTRL, 0); /* operators below are in this toolbox */
-       WM_keymap_add_item(keymap, "MESH_OT_fill_mesh", FKEY, KM_PRESS, KM_SHIFT, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_fill", FKEY, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_add_item(keymap, "MESH_OT_beauty_fill", FKEY, KM_PRESS, KM_ALT, 0);
        WM_keymap_add_item(keymap, "MESH_OT_convert_quads_to_tris", TKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "MESH_OT_convert_tris_to_quads", JKEY, KM_PRESS, KM_ALT, 0);
@@ -238,7 +238,7 @@ void ED_keymap_mesh(wmWindowManager *wm)
        WM_keymap_add_item(keymap, "MESH_OT_separate", PKEY, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
        
-       WM_keymap_add_item(keymap, "MESH_OT_delete_mesh", XKEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_delete", XKEY, KM_PRESS, 0, 0);
        
        WM_keymap_add_item(keymap, "MESH_OT_make_fgon", FKEY, KM_PRESS, KM_ALT, 0);
        WM_keymap_add_item(keymap, "MESH_OT_clear_fgon", FKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0);
index cc8b52919c470a487202b9fed2a1128277331cdc..507d21ac245bfa8d1ae5f984894cfcbd98fd9a80 100644 (file)
@@ -1647,10 +1647,10 @@ static int object_select_random_exec(bContext *C, wmOperator *op)
 {      
        float percent;
        
-       percent = RNA_float_get(op->ptr, "percent");
+       percent = RNA_float_get(op->ptr, "percent") / 100.0f;
                
        CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
-               if ((!base->flag & SELECT && (BLI_frand() * 100) < percent)) {
+               if ((!base->flag & SELECT && BLI_frand() < percent)) {
                                ED_base_object_select(base, BA_SELECT);
                }
        }
@@ -1675,7 +1675,7 @@ void OBJECT_OT_select_random(wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
-       RNA_def_float(ot->srna, "percent", 50.0f, 0.0f, FLT_MAX, "Percent", "1", 0.01f, 100.0f);
+       RNA_def_float(ot->srna, "percent", 50.0f, 0.0f, 100.0f, "Percent", "percentage of objects to randomly select", 0.01f, 100.0f);
 }
 
 /* ******** Clear object Translation *********** */
index 85b861adf5eda44ad4068315bfd19152186b6865..d37e882fe36c8a22a054a2d81cdeb4def85bfbc4 100644 (file)
@@ -5971,7 +5971,7 @@ static int editmesh_face_toolbox_invoke(bContext *C, wmOperator *op, wmEvent *ev
 
        head= uiPupMenuBegin("Edit Faces");
 
-       uiMenuItemO(head, "MESH_OT_fill_mesh", ICON_BLANK1);
+       uiMenuItemO(head, "MESH_OT_fill", ICON_BLANK1);
        uiMenuItemO(head, "MESH_OT_beauty_fill", ICON_BLANK1);
        uiMenuItemO(head, "MESH_OT_convert_quads_to_tris", ICON_BLANK1);
        uiMenuItemO(head, "MESH_OT_convert_tris_to_quads", ICON_BLANK1);