2.5: Operator naming, reviewed some of the recent changes
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 15 Apr 2009 15:40:31 +0000 (15:40 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 15 Apr 2009 15:40:31 +0000 (15:40 +0000)
by Shaul, did some minor tweaks.

source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_lib.c
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/space_node/node_edit.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_view3d/view3d_header.c

index 39d6a945db740a8a6334096f3669eeec8fa65c2f..40373c9f32793cc3eed5af7345aef770cc408824 100644 (file)
@@ -1465,7 +1465,7 @@ static int mesh_separate_selected(Scene *scene, Base *editbase)
        if(em->selected.first) 
                BLI_freelistN(&(em->selected)); /* clear the selection order */
                
-       EM_selectmode_set(em);  // enforce full consistant selection flags 
+       EM_selectmode_set(em);  // enforce full consistent selection flags 
        
        EM_stats_update(em);
        
index 83613987b6f13a08fc6ac8460433298ef7fadb19..bfa381550df7937796cc175f014247678bbbe4a3 100644 (file)
@@ -549,7 +549,7 @@ void EM_select_flush(EditMesh *em)
        EM_nfaces_selected(em);
 }
 
-/* when vertices or edges can be selected, also make fgon consistant */
+/* when vertices or edges can be selected, also make fgon consistent */
 static void check_fgons_selection(EditMesh *em)
 {
        EditFace *efa, *efan;
@@ -740,7 +740,7 @@ void EM_convertsel(EditMesh *em, short oldmode, short selectmode)
        EM_nfaces_selected(em);
 }
 
-/* when switching select mode, makes sure selection is consistant for editing */
+/* when switching select mode, makes sure selection is consistent for editing */
 /* also for paranoia checks to make sure edge or face mode works */
 void EM_selectmode_set(EditMesh *em)
 {
@@ -1751,7 +1751,7 @@ void adduplicateflag(EditMesh *em, int flag)
        EditFace *efa, *newfa, *act_efa = EM_get_actFace(em, 0);
 
        EM_clear_flag_all(em, 128);
-       EM_selectmode_set(em);  // paranoia check, selection now is consistant
+       EM_selectmode_set(em);  // paranoia check, selection now is consistent
 
        /* vertices first */
        for(eve= em->verts.last; eve; eve= eve->prev) {
index b0eacc839535f721f6a117549349ede32fca7e98..faa3176c95822197035443a1f4acb562cb95920f 100644 (file)
@@ -2152,11 +2152,11 @@ static int mesh_shortest_path_select_invoke(bContext *C, wmOperator *op, wmEvent
        return OPERATOR_FINISHED;
 }
        
-void MESH_OT_path_select_shortest(wmOperatorType *ot)
+void MESH_OT_select_shortest_path(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Shortest Path Select";
-       ot->idname= "MESH_OT_path_select_shortest";
+       ot->idname= "MESH_OT_select_shortest_path";
        
        /* api callbacks */
        ot->invoke= mesh_shortest_path_select_invoke;
@@ -4069,11 +4069,11 @@ static int righthandfaces_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_normals_make_consistant(wmOperatorType *ot)
+void MESH_OT_normals_make_consistent(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name= "Make Normals Consistant";
-       ot->idname= "MESH_OT_normals_make_consistant";
+       ot->name= "Make Normals Consistent";
+       ot->idname= "MESH_OT_normals_make_consistent";
        
        /* api callbacks */
        ot->exec= righthandfaces_exec;
@@ -4537,11 +4537,11 @@ static int vertices_to_sphere_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_vertices_to_sphere_transform(wmOperatorType *ot)
+void MESH_OT_vertices_transform_to_sphere(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Vertices to Sphere";
-       ot->idname= "MESH_OT_vertices_to_sphere_transform";
+       ot->idname= "MESH_OT_vertices_transform_to_sphere";
        
        /* api callbacks */
        ot->exec= vertices_to_sphere_exec;
index 5ce86a7eb872bad897ae0937795be1ed32f7bfb2..fc3c8b1dc7704b968fec3b5bc61b49b28683dc10 100644 (file)
@@ -504,11 +504,11 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;       
 }
 
-void MESH_OT_doubles_remove(wmOperatorType *ot)
+void MESH_OT_remove_doubles(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Remove Doubles";
-       ot->idname= "MESH_OT_doubles_remove";
+       ot->idname= "MESH_OT_remove_doubles";
        
        /* api callbacks */
        ot->exec= removedoublesflag_exec;
@@ -6954,7 +6954,7 @@ void MESH_OT_beauty_fill(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static int convert_quads_to_tris_exec(bContext *C, wmOperator *op)
+static int quads_convert_to_tris_exec(bContext *C, wmOperator *op)
 {
        Object *obedit= CTX_data_edit_object(C);
        EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6967,21 +6967,21 @@ static int convert_quads_to_tris_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void MESH_OT_quads_to_tris_convert(wmOperatorType *ot)
+void MESH_OT_quads_convert_to_tris(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Quads to Tris";
-       ot->idname= "MESH_OT_quads_to_tris_convert";
+       ot->idname= "MESH_OT_quads_convert_to_tris";
        
        /* api callbacks */
-       ot->exec= convert_quads_to_tris_exec;
+       ot->exec= quads_convert_to_tris_exec;
        ot->poll= ED_operator_editmesh;
        
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static int convert_tris_to_quads_exec(bContext *C, wmOperator *op)
+static int tris_convert_to_quads_exec(bContext *C, wmOperator *op)
 {
        Object *obedit= CTX_data_edit_object(C);
        EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6994,14 +6994,14 @@ static int convert_tris_to_quads_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void MESH_OT_tris_to_quads_convert(wmOperatorType *ot)
+void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Tris to Quads";
-       ot->idname= "MESH_OT_tris_to_quads_convert";
+       ot->idname= "MESH_OT_tris_convert_to_quads";
        
        /* api callbacks */
-       ot->exec= convert_tris_to_quads_exec;
+       ot->exec= tris_convert_to_quads_exec;
        ot->poll= ED_operator_editmesh;
        
        /* flags */
index 0ea410a627986807eb6b24c82d6c40bd62f7ed54..f7d2fcfc1f2a12556aa97671d5250b23f3a535af 100644 (file)
@@ -154,15 +154,15 @@ 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_normals_make_consistant(struct wmOperatorType *ot);
+void MESH_OT_normals_make_consistent(struct wmOperatorType *ot);
 void MESH_OT_faces_select_linked_flat(struct wmOperatorType *ot);
 void MESH_OT_edges_select_sharp(struct wmOperatorType *ot);
-void MESH_OT_path_select_shortest(struct wmOperatorType *ot);
+void MESH_OT_select_shortest_path(struct wmOperatorType *ot);
 void MESH_OT_vertices_select_similar(struct wmOperatorType *ot);
 void MESH_OT_edges_select_similar(struct wmOperatorType *ot);
 void MESH_OT_faces_select_similar(struct wmOperatorType *ot);
 void MESH_OT_select_random(struct wmOperatorType *ot);
-void MESH_OT_vertices_to_sphere_transform(struct wmOperatorType *ot);
+void MESH_OT_vertices_transform_to_sphere(struct wmOperatorType *ot);
 void MESH_OT_selection_type(struct wmOperatorType *ot);
 void MESH_OT_loop_multi_select(struct wmOperatorType *ot);
 void MESH_OT_mark_seam(struct wmOperatorType *ot);
@@ -207,15 +207,15 @@ void MESH_OT_subdivs(struct wmOperatorType *ot);
 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_doubles_remove(struct wmOperatorType *ot);
+void MESH_OT_remove_doubles(struct wmOperatorType *ot);
 void MESH_OT_extrude(struct wmOperatorType *ot);
 void MESH_OT_spin(struct wmOperatorType *ot);
 void MESH_OT_screw(struct wmOperatorType *ot);
 
 void MESH_OT_fill(struct wmOperatorType *ot);
 void MESH_OT_beauty_fill(struct wmOperatorType *ot);
-void MESH_OT_quads_to_tris_convert(struct wmOperatorType *ot);
-void MESH_OT_tris_to_quads_convert(struct wmOperatorType *ot);
+void MESH_OT_quads_convert_to_tris(struct wmOperatorType *ot);
+void MESH_OT_tris_convert_to_quads(struct wmOperatorType *ot);
 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);
index 023208ac1b38d3b1b29ed2495f3e455e222f09d3..69d580afea9350ae078f46a896b947a652a5fec1 100644 (file)
@@ -118,7 +118,7 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_selection_type);
        WM_operatortype_append(MESH_OT_hide);
        WM_operatortype_append(MESH_OT_reveal);
-       WM_operatortype_append(MESH_OT_normals_make_consistant);
+       WM_operatortype_append(MESH_OT_normals_make_consistent);
        WM_operatortype_append(MESH_OT_subdivide);
        WM_operatortype_append(MESH_OT_subdivide_multi);
        WM_operatortype_append(MESH_OT_subdivide_multi_fractal);
@@ -139,12 +139,12 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_fgon_clear);
        WM_operatortype_append(MESH_OT_fgon_make);
        WM_operatortype_append(MESH_OT_duplicate_add);
-       WM_operatortype_append(MESH_OT_doubles_remove);
+       WM_operatortype_append(MESH_OT_remove_doubles);
        WM_operatortype_append(MESH_OT_extrude);
        WM_operatortype_append(MESH_OT_spin);
        WM_operatortype_append(MESH_OT_screw);
        
-       WM_operatortype_append(MESH_OT_vertices_to_sphere_transform);
+       WM_operatortype_append(MESH_OT_vertices_transform_to_sphere);
        WM_operatortype_append(MESH_OT_split);
        WM_operatortype_append(MESH_OT_extrude_repeat);
        WM_operatortype_append(MESH_OT_edge_rotate);
@@ -158,8 +158,8 @@ void ED_operatortypes_mesh(void)
        
        WM_operatortype_append(MESH_OT_fill);
        WM_operatortype_append(MESH_OT_beauty_fill);
-       WM_operatortype_append(MESH_OT_quads_to_tris_convert);
-       WM_operatortype_append(MESH_OT_tris_to_quads_convert);
+       WM_operatortype_append(MESH_OT_quads_convert_to_tris);
+       WM_operatortype_append(MESH_OT_tris_convert_to_quads);
        WM_operatortype_append(MESH_OT_edge_flip);
        WM_operatortype_append(MESH_OT_faces_shade_smooth);
        WM_operatortype_append(MESH_OT_faces_shade_solid);
@@ -170,7 +170,7 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_dupli_extrude_cursor);
        WM_operatortype_append(MESH_OT_loop_select);
        WM_operatortype_append(MESH_OT_edge_face_add);
-       WM_operatortype_append(MESH_OT_path_select_shortest);
+       WM_operatortype_append(MESH_OT_select_shortest_path);
        WM_operatortype_append(MESH_OT_vertices_select_similar);
        WM_operatortype_append(MESH_OT_edges_select_similar);
        WM_operatortype_append(MESH_OT_faces_select_similar);
@@ -201,7 +201,7 @@ void ED_keymap_mesh(wmWindowManager *wm)
        RNA_boolean_set(kmi->ptr, "extend", 1);
        RNA_boolean_set(kmi->ptr, "ring", 1);
 
-       WM_keymap_add_item(keymap, "MESH_OT_path_select_shortest", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_select_shortest_path", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
        
        WM_keymap_add_item(keymap, "MESH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "MESH_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
@@ -217,7 +217,7 @@ void ED_keymap_mesh(wmWindowManager *wm)
        RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_edges_select_sharp", SKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.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_transform", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT , 0);
+       WM_keymap_add_item(keymap, "MESH_OT_vertices_transform_to_sphere", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT , 0);
 
        WM_keymap_add_item(keymap, "MESH_OT_mark_seam", ONEKEY, KM_PRESS, KM_CTRL , 0);
        RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_mark_seam", ONEKEY, KM_PRESS, KM_ALT , 0)->ptr,"clear",1);
@@ -239,8 +239,8 @@ void ED_keymap_mesh(wmWindowManager *wm)
        WM_keymap_add_item(keymap, "MESH_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
        
        /* tools */
-       WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistant", NKEY, KM_PRESS, KM_CTRL, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistant", NKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "inside", 1);
+       WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "inside", 1);
        WM_keymap_add_item(keymap, "MESH_OT_vertices_smooth", THREEKEY, KM_PRESS, KM_CTRL , 0);
        WM_keymap_add_item(keymap, "MESH_OT_flip_editnormals", THREEKEY, KM_PRESS, KM_ALT , 0);
        
@@ -248,7 +248,7 @@ void ED_keymap_mesh(wmWindowManager *wm)
        /*WM_keymap_add_item(keymap, "MESH_OT_subdivide_multi", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
        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_doubles_remove", VKEY, KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_remove_doubles", VKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "MESH_OT_extrude", EKEY, KM_PRESS, 0, 0);
        
        WM_keymap_add_item(keymap, "MESH_OT_spin", RKEY, KM_PRESS, KM_ALT, 0);
@@ -257,8 +257,8 @@ void ED_keymap_mesh(wmWindowManager *wm)
        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", 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_quads_to_tris_convert", TKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "MESH_OT_tris_to_quads_convert", JKEY, KM_PRESS, KM_ALT, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "MESH_OT_tris_convert_to_quads", JKEY, KM_PRESS, KM_ALT, 0);
        
        WM_keymap_add_item(keymap, "MESH_OT_split", FOURKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "MESH_OT_extrude_repeat", FOURKEY, KM_PRESS, KM_ALT, 0);
index 044a8d3fabec6908a74a1bfc04851a5acd760f8b..5ee7326cd2f4f79c41330725d881bf38db3f6162 100644 (file)
@@ -1056,7 +1056,7 @@ typedef struct NodeSizeWidget {
        float oldwidth;
 } NodeSizeWidget;
 
-static int node_size_widget_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
        ARegion *ar= CTX_wm_region(C);
@@ -1099,7 +1099,7 @@ static int node_size_widget_modal(bContext *C, wmOperator *op, wmEvent *event)
        return OPERATOR_RUNNING_MODAL;
 }
 
-static int node_size_widget_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int node_resize_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
        ARegion *ar= CTX_wm_region(C);
@@ -1135,15 +1135,15 @@ static int node_size_widget_invoke(bContext *C, wmOperator *op, wmEvent *event)
        return OPERATOR_PASS_THROUGH;
 }
 
-void NODE_OT_widget_size(wmOperatorType *ot)
+void NODE_OT_resize(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name= "Scale Node";
-       ot->idname= "NODE_OT_widget_size";
+       ot->name= "Resize Node";
+       ot->idname= "NODE_OT_resize";
        
        /* api callbacks */
-       ot->invoke= node_size_widget_invoke;
-       ot->modal= node_size_widget_modal;
+       ot->invoke= node_resize_invoke;
+       ot->modal= node_resize_modal;
        ot->poll= ED_operator_node_active;
        
        /* flags */
index 1ad0b34862634e71d2a7dd6ec975128988e3fc60..b73f57f935ffd05a734871e89c5d3802b79317e9 100644 (file)
@@ -84,7 +84,7 @@ void snode_autoconnect(SpaceNode *snode, bNode *node_to, int flag);
 
 void NODE_OT_link(struct wmOperatorType *ot);
 void NODE_OT_delete(struct wmOperatorType *ot);
-void NODE_OT_widget_size(struct wmOperatorType *ot);
+void NODE_OT_resize(struct wmOperatorType *ot);
 void NODE_OT_links_cut(struct wmOperatorType *ot);
 
 // XXXXXX
index 7bd41154c1bf609c8f809f3b9f098806d7891936..7a1cc24fa5819692dbc1d5edb92c87733039caea 100644 (file)
@@ -57,7 +57,7 @@ void node_operatortypes(void)
        WM_operatortype_append(NODE_OT_select_border);
        WM_operatortype_append(NODE_OT_delete);
        WM_operatortype_append(NODE_OT_link);
-       WM_operatortype_append(NODE_OT_widget_size);
+       WM_operatortype_append(NODE_OT_resize);
        WM_operatortype_append(NODE_OT_links_cut);
 }
 
@@ -72,7 +72,7 @@ void node_keymap(struct wmWindowManager *wm)
        RNA_enum_set(WM_keymap_add_item(keymap, "NODE_OT_select_extend", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "select_type", NODE_SELECT_MOUSE);
        
        WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "NODE_OT_widget_size", LEFTMOUSE, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "NODE_OT_resize", LEFTMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "NODE_OT_visibility_toggle", LEFTMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "NODE_OT_links_cut", LEFTMOUSE, KM_PRESS, KM_ALT, 0);
        
index acbab541c3c0618c0898e94c99fe58aaa9df783c..8578024e4fff6c259dcd1b4e27df15213f619779 100644 (file)
@@ -5560,8 +5560,8 @@ static int editmesh_face_toolbox_invoke(bContext *C, wmOperator *op, wmEvent *ev
 
        uiMenuItemO(head, 0, "MESH_OT_fill");
        uiMenuItemO(head, 0, "MESH_OT_beauty_fill");
-       uiMenuItemO(head, 0, "MESH_OT_quads_to_tris_convert");
-       uiMenuItemO(head, 0, "MESH_OT_tris_to_quads_convert");
+       uiMenuItemO(head, 0, "MESH_OT_quads_convert_to_tris");
+       uiMenuItemO(head, 0, "MESH_OT_tris_convert_to_quads");
        uiMenuItemO(head, 0, "MESH_OT_edge_flip");
        uiMenuItemO(head, 0, "MESH_OT_faces_shade_smooth");
        uiMenuItemO(head, 0, "MESH_OT_faces_shade_solid");