diff options
Diffstat (limited to 'source/blender/editors/mesh/editmesh_mods.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_mods.c | 194 |
1 files changed, 98 insertions, 96 deletions
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 9497370a4fa..748ce641b24 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -55,6 +55,8 @@ editmesh_mods.c, UI level access, no geometry changes #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_displist.h" #include "BKE_depsgraph.h" @@ -712,22 +714,22 @@ static int unified_findnearest(ViewContext *vc, EditVert **eve, EditEdge **eed, #define SIMFACE_TOT 207 static EnumPropertyItem prop_similar_types[] = { - {SIMVERT_NORMAL, "NORMAL", 0, "Normal", ""}, - {SIMVERT_FACE, "FACE", 0, "Amount of Vertices in Face", ""}, - {SIMVERT_VGROUP, "VGROUP", 0, "Vertex Groups", ""}, - {SIMEDGE_LENGTH, "LENGTH", 0, "Length", ""}, - {SIMEDGE_DIR, "DIR", 0, "Direction", ""}, - {SIMEDGE_FACE, "FACE", 0, "Amount of Vertices in Face", ""}, - {SIMEDGE_FACE_ANGLE, "FACE_ANGLE", 0, "Face Angles", ""}, - {SIMEDGE_CREASE, "CREASE", 0, "Crease", ""}, - {SIMEDGE_SEAM, "SEAM", 0, "Seam", ""}, - {SIMEDGE_SHARP, "SHARP", 0, "Sharpness", ""}, - {SIMFACE_MATERIAL, "MATERIAL", 0, "Material", ""}, - {SIMFACE_IMAGE, "IMAGE", 0, "Image", ""}, - {SIMFACE_AREA, "AREA", 0, "Area", ""}, - {SIMFACE_PERIMETER, "PERIMETER", 0, "Perimeter", ""}, - {SIMFACE_NORMAL, "NORMAL", 0, "Normal", ""}, - {SIMFACE_COPLANAR, "COPLANAR", 0, "Co-planar", ""}, + {SIMVERT_NORMAL, "NORMAL", 0, N_("Normal"), ""}, + {SIMVERT_FACE, "FACE", 0, N_("Amount of Vertices in Face"), ""}, + {SIMVERT_VGROUP, "VGROUP", 0, N_("Vertex Groups"), ""}, + {SIMEDGE_LENGTH, "LENGTH", 0, N_("Length"), ""}, + {SIMEDGE_DIR, "DIR", 0, N_("Direction"), ""}, + {SIMEDGE_FACE, "FACE", 0, N_("Amount of Vertices in Face"), ""}, + {SIMEDGE_FACE_ANGLE, "FACE_ANGLE", 0, N_("Face Angles"), ""}, + {SIMEDGE_CREASE, "CREASE", 0, N_("Crease"), ""}, + {SIMEDGE_SEAM, "SEAM", 0, N_("Seam"), ""}, + {SIMEDGE_SHARP, "SHARP", 0, N_("Sharpness"), ""}, + {SIMFACE_MATERIAL, "MATERIAL", 0, N_("Material"), ""}, + {SIMFACE_IMAGE, "IMAGE", 0, N_("Image"), ""}, + {SIMFACE_AREA, "AREA", 0, N_("Area"), ""}, + {SIMFACE_PERIMETER, "PERIMETER", 0, N_("Perimeter"), ""}, + {SIMFACE_NORMAL, "NORMAL", 0, N_("Normal"), ""}, + {SIMFACE_COPLANAR, "COPLANAR", 0, N_("Co-planar"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1288,8 +1290,8 @@ void MESH_OT_select_similar(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Select Similar"; - ot->description= "Select similar vertices, edges or faces by property types"; + ot->name= _("Select Similar"); + ot->description= _("Select similar vertices, edges or faces by property types"); ot->idname= "MESH_OT_select_similar"; /* api callbacks */ @@ -1301,10 +1303,10 @@ void MESH_OT_select_similar(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "type", prop_similar_types, SIMVERT_NORMAL, "Type", ""); + prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_similar_types), SIMVERT_NORMAL, _("Type"), ""); RNA_def_enum_funcs(prop, select_similar_type_itemf); ot->prop= prop; - RNA_def_float(ot->srna, "threshold", 0.01f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 100.f); + RNA_def_float(ot->srna, "threshold", 0.01f, 0.0f, FLT_MAX, _("Threshold"), "", 0.0f, 100.f); } /* ******************************************* */ @@ -2040,8 +2042,8 @@ static int loop_multiselect(bContext *C, wmOperator *op) void MESH_OT_loop_multi_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Multi Select Loops"; - ot->description= "Select a loop of connected edges by connection type"; + ot->name= _("Multi Select Loops"); + ot->description= _("Select a loop of connected edges by connection type"); ot->idname= "MESH_OT_loop_multi_select"; /* api callbacks */ @@ -2052,7 +2054,7 @@ void MESH_OT_loop_multi_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "ring", 0, "Ring", ""); + RNA_def_boolean(ot->srna, "ring", 0, _("Ring"), ""); } @@ -2130,8 +2132,8 @@ static int mesh_select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event) void MESH_OT_loop_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Loop Select"; - ot->description= "Select a loop of connected edges"; + ot->name= _("Loop Select"); + ot->description= _("Select a loop of connected edges"); ot->idname= "MESH_OT_loop_select"; /* api callbacks */ @@ -2142,8 +2144,8 @@ void MESH_OT_loop_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); - RNA_def_boolean(ot->srna, "ring", 0, "Select Ring", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); + RNA_def_boolean(ot->srna, "ring", 0, _("Select Ring"), ""); } /* ******************* mesh shortest path select, uses prev-selected edge ****************** */ @@ -2261,8 +2263,8 @@ static int mesh_shortest_path_select_poll(bContext *C) void MESH_OT_select_shortest_path(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shortest Path Select"; - ot->description= "Select shortest path between two selections"; + ot->name= _("Shortest Path Select"); + ot->description= _("Select shortest path between two selections"); ot->idname= "MESH_OT_select_shortest_path"; /* api callbacks */ @@ -2273,7 +2275,7 @@ void MESH_OT_select_shortest_path(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); } @@ -2569,8 +2571,8 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event void MESH_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; - ot->description= "(un)select all vertices linked to the active mesh"; + ot->name= _("Select Linked"); + ot->description= _("(un)select all vertices linked to the active mesh"); ot->idname= "MESH_OT_select_linked_pick"; /* api callbacks */ @@ -2580,8 +2582,8 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", ""); - RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", "Limit selection by seam boundaries (faces only)"); + RNA_def_boolean(ot->srna, "deselect", 0, _("Deselect"), ""); + RNA_def_boolean(ot->srna, "limit", 0, _("Limit by Seams"), _("Limit selection by seam boundaries (faces only)")); } @@ -2658,8 +2660,8 @@ static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve void MESH_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked All"; - ot->description= "Select all vertices linked to the active mesh"; + ot->name= _("Select Linked All"); + ot->description= _("Select all vertices linked to the active mesh"); ot->idname= "MESH_OT_select_linked"; /* api callbacks */ @@ -2670,7 +2672,7 @@ void MESH_OT_select_linked(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", "Limit selection by seam boundaries (faces only)"); + RNA_def_boolean(ot->srna, "limit", 0, _("Limit by Seams"), _("Limit selection by seam boundaries (faces only)")); } @@ -2795,8 +2797,8 @@ static int hide_mesh_exec(bContext *C, wmOperator *op) void MESH_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selection"; - ot->description= "Hide (un)selected vertices, edges or faces"; + ot->name= _("Hide Selection"); + ot->description= _("Hide (un)selected vertices, edges or faces"); ot->idname= "MESH_OT_hide"; /* api callbacks */ @@ -2807,7 +2809,7 @@ void MESH_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } void EM_reveal_mesh(EditMesh *em) @@ -2862,8 +2864,8 @@ static int reveal_mesh_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal Hidden"; - ot->description= "Reveal all hidden vertices, edges and faces"; + ot->name= _("Reveal Hidden"); + ot->description= _("Reveal all hidden vertices, edges and faces"); ot->idname= "MESH_OT_reveal"; /* api callbacks */ @@ -2913,14 +2915,14 @@ static int select_by_number_vertices_exec(bContext *C, wmOperator *op) void MESH_OT_select_by_number_vertices(wmOperatorType *ot) { static const EnumPropertyItem type_items[]= { - {3, "TRIANGLES", 0, "Triangles", NULL}, - {4, "QUADS", 0, "Quads", NULL}, - {5, "OTHER", 0, "Other", NULL}, + {3, "TRIANGLES", 0, N_("Triangles"), NULL}, + {4, "QUADS", 0, N_("Quads"), NULL}, + {5, "OTHER", 0, N_("Other"), NULL}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Select by Number of Vertices"; - ot->description= "Select vertices or faces by vertex count"; + ot->name= _("Select by Number of Vertices"); + ot->description= _("Select vertices or faces by vertex count"); ot->idname= "MESH_OT_select_by_number_vertices"; /* api callbacks */ @@ -2932,7 +2934,7 @@ void MESH_OT_select_by_number_vertices(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, 3, "Type", "Type of elements to select."); + ot->prop= RNA_def_enum(ot->srna, "type", type_items, 3, _("Type"), _("Type of elements to select.")); } @@ -2953,8 +2955,8 @@ static int select_mirror_exec(bContext *C, wmOperator *op) void MESH_OT_select_mirror(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Mirror"; - ot->description= "Select mesh items at mirrored locations"; + ot->name= _("Select Mirror"); + ot->description= _("Select mesh items at mirrored locations"); ot->idname= "MESH_OT_select_mirror"; /* api callbacks */ @@ -2965,7 +2967,7 @@ void MESH_OT_select_mirror(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the existing selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend the existing selection")); } static int select_sharp_edges_exec(bContext *C, wmOperator *op) @@ -3074,8 +3076,8 @@ static int select_sharp_edges_exec(bContext *C, wmOperator *op) void MESH_OT_edges_select_sharp(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Sharp Edges"; - ot->description= "Marked selected edges as sharp"; + ot->name= _("Select Sharp Edges"); + ot->description= _("Marked selected edges as sharp"); ot->idname= "MESH_OT_edges_select_sharp"; /* api callbacks */ @@ -3086,7 +3088,7 @@ void MESH_OT_edges_select_sharp(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float(ot->srna, "sharpness", 0.01f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f); + RNA_def_float(ot->srna, "sharpness", 0.01f, 0.0f, FLT_MAX, _("sharpness"), "", 0.0f, 180.0f); } @@ -3242,8 +3244,8 @@ static int select_linked_flat_faces_exec(bContext *C, wmOperator *op) void MESH_OT_faces_select_linked_flat(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked Flat Faces"; - ot->description= "Select linked faces by angle"; + ot->name= _("Select Linked Flat Faces"); + ot->description= _("Select linked faces by angle"); ot->idname= "MESH_OT_faces_select_linked_flat"; /* api callbacks */ @@ -3254,7 +3256,7 @@ void MESH_OT_faces_select_linked_flat(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float(ot->srna, "sharpness", 135.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); } static void select_non_manifold(EditMesh *em, wmOperator *op ) @@ -3343,8 +3345,8 @@ static int select_non_manifold_exec(bContext *C, wmOperator *op) void MESH_OT_select_non_manifold(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Non Manifold"; - ot->description= "Select all non-manifold vertices or edges"; + ot->name= _("Select Non Manifold"); + ot->description= _("Select all non-manifold vertices or edges"); ot->idname= "MESH_OT_select_non_manifold"; /* api callbacks */ @@ -3407,8 +3409,8 @@ static int select_inverse_mesh_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Inverse"; - ot->description= "Select inverse of (un)selected vertices, edges or faces"; + ot->name= _("Select Inverse"); + ot->description= _("Select inverse of (un)selected vertices, edges or faces"); ot->idname= "MESH_OT_select_inverse"; /* api callbacks */ @@ -3469,8 +3471,8 @@ static int select_all_exec(bContext *C, wmOperator *op) void MESH_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; - ot->description= "Change selection of all vertices, edges or faces"; + ot->name= _("Select or Deselect All"); + ot->description= _("Change selection of all vertices, edges or faces"); ot->idname= "MESH_OT_select_all"; /* api callbacks */ @@ -3542,8 +3544,8 @@ static int select_more(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_select_more(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select More"; - ot->description= "Select more vertices, edges or faces connected to initial selection"; + ot->name= _("Select More"); + ot->description= _("Select more vertices, edges or faces connected to initial selection"); ot->idname= "MESH_OT_select_more"; /* api callbacks */ @@ -3632,8 +3634,8 @@ static int select_less(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_select_less(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Less"; - ot->description= "Select less vertices, edges or faces connected to initial selection"; + ot->name= _("Select Less"); + ot->description= _("Select less vertices, edges or faces connected to initial selection"); ot->idname= "MESH_OT_select_less"; /* api callbacks */ @@ -3702,8 +3704,8 @@ static int mesh_select_random_exec(bContext *C, wmOperator *op) void MESH_OT_select_random(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Random"; - ot->description= "Randomly select vertices"; + ot->name= _("Select Random"); + ot->description= _("Randomly select vertices"); ot->idname= "MESH_OT_select_random"; /* api callbacks */ @@ -3714,8 +3716,8 @@ void MESH_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly.", 0.f, 100.0f); - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first."); + RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, _("Percent"), _("Percentage of elements to select randomly."), 0.f, 100.0f); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend Selection"), _("Extend selection instead of deselecting everything first.")); } void EM_select_by_material(EditMesh *em, int index) @@ -3797,8 +3799,8 @@ static int editmesh_mark_seam(bContext *C, wmOperator *op) void MESH_OT_mark_seam(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mark Seam"; - ot->description= "(un)mark selected edges as a seam"; + ot->name= _("Mark Seam"); + ot->description= _("(un)mark selected edges as a seam"); ot->idname= "MESH_OT_mark_seam"; /* api callbacks */ @@ -3808,7 +3810,7 @@ void MESH_OT_mark_seam(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "clear", 0, "Clear", ""); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), ""); } static int editmesh_mark_sharp(bContext *C, wmOperator *op) @@ -3849,8 +3851,8 @@ static int editmesh_mark_sharp(bContext *C, wmOperator *op) void MESH_OT_mark_sharp(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mark Sharp"; - ot->description= "(un)mark selected edges as sharp"; + ot->name= _("Mark Sharp"); + ot->description= _("(un)mark selected edges as sharp"); ot->idname= "MESH_OT_mark_sharp"; /* api callbacks */ @@ -3860,7 +3862,7 @@ void MESH_OT_mark_sharp(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "clear", 0, "Clear", ""); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), ""); } /* **************** NORMALS ************** */ @@ -4093,8 +4095,8 @@ static int normals_make_consistent_exec(bContext *C, wmOperator *op) void MESH_OT_normals_make_consistent(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Normals Consistent"; - ot->description= "Flip all selected vertex and face normals in a consistent direction"; + ot->name= _("Make Normals Consistent"); + ot->description= _("Flip all selected vertex and face normals in a consistent direction"); ot->idname= "MESH_OT_normals_make_consistent"; /* api callbacks */ @@ -4104,7 +4106,7 @@ void MESH_OT_normals_make_consistent(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "inside", 0, "Inside", ""); + RNA_def_boolean(ot->srna, "inside", 0, _("Inside"), ""); } /* **************** VERTEX DEFORMS *************** */ @@ -4271,8 +4273,8 @@ static int smooth_vertex_exec(bContext *C, wmOperator *op) void MESH_OT_vertices_smooth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth Vertex"; - ot->description= "Flatten angles of selected vertices"; + ot->name= _("Smooth Vertex"); + ot->description= _("Flatten angles of selected vertices"); ot->idname= "MESH_OT_vertices_smooth"; /* api callbacks */ @@ -4282,10 +4284,10 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Smooth Iterations", "", 1, INT_MAX); - RNA_def_boolean(ot->srna, "xaxis", 1, "X-Axis", "Smooth along the X axis."); - RNA_def_boolean(ot->srna, "yaxis", 1, "Y-Axis", "Smooth along the Y axis."); - RNA_def_boolean(ot->srna, "zaxis", 1, "Z-Axis", "Smooth along the Z axis."); + RNA_def_int(ot->srna, "repeat", 1, 1, 100, _("Smooth Iterations"), "", 1, INT_MAX); + RNA_def_boolean(ot->srna, "xaxis", 1, _("X-Axis"), _("Smooth along the X axis.")); + RNA_def_boolean(ot->srna, "yaxis", 1, _("Y-Axis"), _("Smooth along the Y axis.")); + RNA_def_boolean(ot->srna, "zaxis", 1, _("Z-Axis"), _("Smooth along the Z axis.")); } static int mesh_noise_exec(bContext *C, wmOperator *op) @@ -4345,8 +4347,8 @@ static int mesh_noise_exec(bContext *C, wmOperator *op) void MESH_OT_noise(wmOperatorType *ot) { /* identifiers */ - ot->name= "Noise"; - ot->description= "Use vertex coordinate as texture coordinate"; + ot->name= _("Noise"); + ot->description= _("Use vertex coordinate as texture coordinate"); ot->idname= "MESH_OT_noise"; /* api callbacks */ @@ -4356,7 +4358,7 @@ void MESH_OT_noise(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_float(ot->srna, "factor", 0.1f, -FLT_MAX, FLT_MAX, "Factor", "", 0.0f, 1.0f); + RNA_def_float(ot->srna, "factor", 0.1f, -FLT_MAX, FLT_MAX, _("Factor"), "", 0.0f, 1.0f); } void flipface(EditMesh *em, EditFace *efa) @@ -4407,8 +4409,8 @@ static int flip_normals(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_flip_normals(wmOperatorType *ot) { /* identifiers */ - ot->name= "Flip Normals"; - ot->description= "Toggle the direction of selected face's vertex and face normals"; + ot->name= _("Flip Normals"); + ot->description= _("Toggle the direction of selected face's vertex and face normals"); ot->idname= "MESH_OT_flip_normals"; /* api callbacks */ @@ -4449,8 +4451,8 @@ void MESH_OT_solidify(wmOperatorType *ot) { PropertyRNA *prop; /* identifiers */ - ot->name= "Solidify"; - ot->description= "Create a solid skin by extruding, compensating for sharp angles"; + ot->name= _("Solidify"); + ot->description= _("Create a solid skin by extruding, compensating for sharp angles"); ot->idname= "MESH_OT_solidify"; /* api callbacks */ @@ -4460,7 +4462,7 @@ void MESH_OT_solidify(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - prop= RNA_def_float(ot->srna, "thickness", 0.01f, -FLT_MAX, FLT_MAX, "Thickness", "", -10.0f, 10.0f); + prop= RNA_def_float(ot->srna, "thickness", 0.01f, -FLT_MAX, FLT_MAX, _("Thickness"), "", -10.0f, 10.0f); RNA_def_property_ui_range(prop, -10, 10, 0.1, 4); } @@ -4484,7 +4486,7 @@ static int mesh_select_nth_exec(bContext *C, wmOperator *op) void MESH_OT_select_nth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Nth"; + ot->name= _("Select Nth"); ot->description= ""; ot->idname= "MESH_OT_select_nth"; @@ -4495,6 +4497,6 @@ void MESH_OT_select_nth(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "nth", 2, 2, 100, "Nth Selection", "", 1, INT_MAX); + RNA_def_int(ot->srna, "nth", 2, 2, 100, _("Nth Selection"), "", 1, INT_MAX); } |