Renaming of Cylindric objects after a good proposal by Conz:
authorThomas Dinges <blender@dingto.org>
Wed, 1 Sep 2010 21:11:33 +0000 (21:11 +0000)
committerThomas Dinges <blender@dingto.org>
Wed, 1 Sep 2010 21:11:33 +0000 (21:11 +0000)
http://www.vrchannel.de/blender/cylinder_rename.png

Mesh Tube > Mesh Cylinder
NURBS Tube > NURBS Cylinder
Metaball Cylinder > Metaball Capsule

I know that naming is something not everyone agrees on, but these terms look geometrically correct.

release/scripts/ui/space_info.py
source/blender/editors/curve/curve_intern.h
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/include/UI_icons.h
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/object/object_add.c
source/blender/makesrna/intern/rna_meta.c

index 7855c983f026c0c5a2534b7195b356b287869fd5..fd6d2708aa193a111d61c3d1677cfe47698bfef3 100644 (file)
@@ -169,7 +169,7 @@ class INFO_MT_mesh_add(bpy.types.Menu):
         layout.operator("mesh.primitive_circle_add", icon='MESH_CIRCLE', text="Circle")
         layout.operator("mesh.primitive_uv_sphere_add", icon='MESH_UVSPHERE', text="UV Sphere")
         layout.operator("mesh.primitive_ico_sphere_add", icon='MESH_ICOSPHERE', text="Icosphere")
-        layout.operator("mesh.primitive_tube_add", icon='MESH_TUBE', text="Tube")
+        layout.operator("mesh.primitive_cylinder_add", icon='MESH_CYLINDER', text="Cylinder")
         layout.operator("mesh.primitive_cone_add", icon='MESH_CONE', text="Cone")
         layout.separator()
         layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text="Grid")
@@ -200,7 +200,7 @@ class INFO_MT_surface_add(bpy.types.Menu):
         layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
         layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
         layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text="NURBS Surface")
-        layout.operator("surface.primitive_nurbs_surface_tube_add", icon='SURFACE_NTUBE', text="NURBS Tube")
+        layout.operator("surface.primitive_nurbs_surface_cylinder_add", icon='SURFACE_NCYLINDER', text="NURBS Cylinder")
         layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere")
         layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus")
 
index fc510a0612362e4b115c7e7c67b5f5e684dc6a38..2567494ddf34a9c88641658e47747b508cacf25b 100644 (file)
@@ -97,7 +97,7 @@ void CURVE_OT_primitive_nurbs_path_add(struct wmOperatorType *ot);
 void SURFACE_OT_primitive_nurbs_surface_curve_add(struct wmOperatorType *ot);
 void SURFACE_OT_primitive_nurbs_surface_circle_add(struct wmOperatorType *ot);
 void SURFACE_OT_primitive_nurbs_surface_surface_add(struct wmOperatorType *ot);
-void SURFACE_OT_primitive_nurbs_surface_tube_add(struct wmOperatorType *ot);
+void SURFACE_OT_primitive_nurbs_surface_cylinder_add(struct wmOperatorType *ot);
 void SURFACE_OT_primitive_nurbs_surface_sphere_add(struct wmOperatorType *ot);
 void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot);
 
index d06013ac1d2542433644d1786532723cd3eb702b..89c19d93b0f7724d1bee1787dfdfa9910a261cd3 100644 (file)
@@ -105,7 +105,7 @@ void ED_operatortypes_curve(void)
        WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_curve_add);
        WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_circle_add);
        WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_surface_add);
-       WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_tube_add);
+       WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_cylinder_add);
        WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_sphere_add);
        WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_torus_add);
        
index a0055d66286ff52c6ee611413f74bc88ca0b4ea9..e6bef11d433fab1a47af3adb7cec327bab5ff4de 100644 (file)
@@ -5867,13 +5867,13 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newname)
                        makeknots(nu, 2);
                }
                break;
-       case CU_PRIM_TUBE:      /* tube */
+       case CU_PRIM_TUBE:      /* Cylinder */
                if( cutype==CU_NURBS ) {
                        Curve *cu= (Curve*)obedit->data;
                        
                        if(newname) {
-                               rename_id((ID *)obedit, "SurfTube");
-                               rename_id((ID *)obedit->data, "SurfTube");
+                               rename_id((ID *)obedit, "SurfCylinder");
+                               rename_id((ID *)obedit->data, "SurfCylinder");
                        }
                        
                        nu= add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_CIRCLE, 0);  /* circle */
@@ -6235,21 +6235,21 @@ void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot)
        ED_object_add_generic_props(ot, TRUE);
 }
 
-static int add_primitive_nurbs_surface_tube_exec(bContext *C, wmOperator *op)
+static int add_primitive_nurbs_surface_cylinder_exec(bContext *C, wmOperator *op)
 {
        return surf_prim_add(C, op, CU_PRIM_TUBE|CU_NURBS);
 }
 
-void SURFACE_OT_primitive_nurbs_surface_tube_add(wmOperatorType *ot)
+void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name= "Add Surface Tube";
-       ot->description= "Construct a Nurbs surface Tube";
-       ot->idname= "SURFACE_OT_primitive_nurbs_surface_tube_add";
+       ot->name= "Add Surface Cylinder";
+       ot->description= "Construct a Nurbs surface Cylinder";
+       ot->idname= "SURFACE_OT_primitive_nurbs_surface_cylinder_add";
        
        /* api callbacks */
        ot->invoke= ED_object_add_generic_invoke;
-       ot->exec= add_primitive_nurbs_surface_tube_exec;
+       ot->exec= add_primitive_nurbs_surface_cylinder_exec;
        ot->poll= ED_operator_scene_editable;
        
        /* flags */
index 1a51c1290051bd61f22c62e436321aeda7f9833b..3e8420df7ebd9e5cb67b321b834f1cbb4c8279b9 100644 (file)
@@ -345,7 +345,7 @@ DEF_ICON(ICON_MESH_UVSPHERE)
 DEF_ICON(ICON_MESH_ICOSPHERE)
 DEF_ICON(ICON_MESH_GRID)
 DEF_ICON(ICON_MESH_MONKEY)
-DEF_ICON(ICON_MESH_TUBE)
+DEF_ICON(ICON_MESH_CYLINDER)
 DEF_ICON(ICON_MESH_TORUS)
 DEF_ICON(ICON_MESH_CONE)
 DEF_ICON(ICON_BLANK610)
@@ -362,14 +362,14 @@ DEF_ICON(ICON_META_PLANE)
 DEF_ICON(ICON_META_CUBE)
 DEF_ICON(ICON_META_BALL)
 DEF_ICON(ICON_META_ELLIPSOID)
-DEF_ICON(ICON_META_TUBE)
+DEF_ICON(ICON_META_CAPSULE)
 DEF_ICON(ICON_BLANK625)
        
        /* PRIMITIVES */
 DEF_ICON(ICON_SURFACE_NCURVE)
 DEF_ICON(ICON_SURFACE_NCIRCLE)
 DEF_ICON(ICON_SURFACE_NSURFACE)
-DEF_ICON(ICON_SURFACE_NTUBE)
+DEF_ICON(ICON_SURFACE_NCYLINDER)
 DEF_ICON(ICON_SURFACE_NSPHERE)
 DEF_ICON(ICON_SURFACE_NTORUS)
 DEF_ICON(ICON_BLANK636)
index ca1a80110f33b072b229e8b28dc0b1d304f27c53..474927d3638011485e938e4137ac1882763681d2 100644 (file)
@@ -1265,7 +1265,7 @@ static char *get_mesh_defname(int type)
                case PRIM_PLANE: return "Plane";
                case PRIM_CUBE: return "Cube";
                case PRIM_CIRCLE: return "Circle";
-               case PRIM_CYLINDER: return "Tube";
+               case PRIM_CYLINDER: return "Cylinder";
                case PRIM_CONE: return "Cone";
                case PRIM_GRID: return "Grid";
                case PRIM_UVSPHERE: return "Sphere";
@@ -1421,7 +1421,7 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot)
        ED_object_add_generic_props(ot, TRUE);
 }
 
-static int add_primitive_tube_exec(bContext *C, wmOperator *op)
+static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
 {
        int enter_editmode;
        unsigned int layer;
@@ -1439,16 +1439,16 @@ static int add_primitive_tube_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void MESH_OT_primitive_tube_add(wmOperatorType *ot)
+void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name= "Add Tube";
-       ot->description= "Construct a tube mesh";
-       ot->idname= "MESH_OT_primitive_tube_add";
+       ot->name= "Add Cylinder";
+       ot->description= "Construct a cylinder mesh";
+       ot->idname= "MESH_OT_primitive_cylinder_add";
        
        /* api callbacks */
        ot->invoke= ED_object_add_generic_invoke;
-       ot->exec= add_primitive_tube_exec;
+       ot->exec= add_primitive_cylinder_exec;
        ot->poll= ED_operator_scene_editable;
        
        /* flags */
index 6db2a3f211d83c5a4974b43483ab8fd9f69ba91a..fcd1eb40a02eb05bace7d07c3a5943bbf6bfd366 100644 (file)
@@ -71,7 +71,7 @@ void MESH_OT_separate(struct wmOperatorType *ot);
 void MESH_OT_primitive_plane_add(struct wmOperatorType *ot);
 void MESH_OT_primitive_cube_add(struct wmOperatorType *ot);
 void MESH_OT_primitive_circle_add(struct wmOperatorType *ot);
-void MESH_OT_primitive_tube_add(struct wmOperatorType *ot);
+void MESH_OT_primitive_cylinder_add(struct wmOperatorType *ot);
 void MESH_OT_primitive_cone_add(struct wmOperatorType *ot);
 void MESH_OT_primitive_grid_add(struct wmOperatorType *ot);
 void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot);
index 6562a4b30aee8317457b11202d1056fb5bbeeb8d..9e071aa4a2150b986f69489fccc17bff58c70035 100644 (file)
@@ -75,7 +75,7 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_primitive_plane_add);
        WM_operatortype_append(MESH_OT_primitive_cube_add);
        WM_operatortype_append(MESH_OT_primitive_circle_add);
-       WM_operatortype_append(MESH_OT_primitive_tube_add);
+       WM_operatortype_append(MESH_OT_primitive_cylinder_add);
        WM_operatortype_append(MESH_OT_primitive_cone_add);
        WM_operatortype_append(MESH_OT_primitive_grid_add);
        WM_operatortype_append(MESH_OT_primitive_monkey_add);
index 924e72e264a0f4da7ad79747eb453c5607764758..40b7df72f1c6a681da3cb80e7101d80d76e73a83 100644 (file)
@@ -495,7 +495,7 @@ void OBJECT_OT_camera_add(wmOperatorType *ot)
 
 static EnumPropertyItem prop_metaball_types[]= {
        {MB_BALL, "MBALL_BALL", ICON_META_BALL, "Meta Ball", ""},
-       {MB_TUBE, "MBALL_TUBE", ICON_META_TUBE, "Meta Tube", ""},
+       {MB_TUBE, "MBALL_CAPSULE", ICON_META_CAPSULE, "Meta Capsule", ""},
        {MB_PLANE, "MBALL_PLANE", ICON_META_PLANE, "Meta Plane", ""},
        {MB_CUBE, "MBALL_CUBE", ICON_META_CUBE, "Meta Cube", ""},
        {MB_ELIPSOID, "MBALL_ELLIPSOID", ICON_META_ELLIPSOID, "Meta Ellipsoid", ""},
index e364b0750247ac466318f5d71c068a5cf6b77995..9bb25ac2cdade96ea74b19c5d4a7460e8e876eda 100644 (file)
@@ -140,7 +140,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Meta
 
 static EnumPropertyItem metaelem_type_items[] = {
        {MB_BALL, "BALL", ICON_META_BALL, "Ball", ""},
-       {MB_TUBE, "TUBE", ICON_META_TUBE, "Tube", ""},
+       {MB_TUBE, "CAPSULE", ICON_META_CAPSULE, "Capsule", ""},
        {MB_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""},
        {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, "Ellipsoid", ""}, // NOTE: typo at original definition!
        {MB_CUBE, "CUBE", ICON_META_CUBE, "Cube", ""},