Renaming of Cylindric objects after a good proposal by Conz:

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.
This commit is contained in:
Thomas Dinges 2010-09-01 21:11:33 +00:00
parent dda1db08ee
commit 4ddc61643a
10 changed files with 27 additions and 27 deletions

@ -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_circle_add", icon='MESH_CIRCLE', text="Circle")
layout.operator("mesh.primitive_uv_sphere_add", icon='MESH_UVSPHERE', text="UV Sphere") 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_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.operator("mesh.primitive_cone_add", icon='MESH_CONE', text="Cone")
layout.separator() layout.separator()
layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text="Grid") 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_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_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_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_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere")
layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus") layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus")

@ -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_curve_add(struct wmOperatorType *ot);
void SURFACE_OT_primitive_nurbs_surface_circle_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_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_sphere_add(struct wmOperatorType *ot);
void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot); void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot);

@ -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_curve_add);
WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_circle_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_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_sphere_add);
WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_torus_add); WM_operatortype_append(SURFACE_OT_primitive_nurbs_surface_torus_add);

@ -5867,13 +5867,13 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newname)
makeknots(nu, 2); makeknots(nu, 2);
} }
break; break;
case CU_PRIM_TUBE: /* tube */ case CU_PRIM_TUBE: /* Cylinder */
if( cutype==CU_NURBS ) { if( cutype==CU_NURBS ) {
Curve *cu= (Curve*)obedit->data; Curve *cu= (Curve*)obedit->data;
if(newname) { if(newname) {
rename_id((ID *)obedit, "SurfTube"); rename_id((ID *)obedit, "SurfCylinder");
rename_id((ID *)obedit->data, "SurfTube"); rename_id((ID *)obedit->data, "SurfCylinder");
} }
nu= add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_CIRCLE, 0); /* circle */ 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); 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); 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 */ /* identifiers */
ot->name= "Add Surface Tube"; ot->name= "Add Surface Cylinder";
ot->description= "Construct a Nurbs surface Tube"; ot->description= "Construct a Nurbs surface Cylinder";
ot->idname= "SURFACE_OT_primitive_nurbs_surface_tube_add"; ot->idname= "SURFACE_OT_primitive_nurbs_surface_cylinder_add";
/* api callbacks */ /* api callbacks */
ot->invoke= ED_object_add_generic_invoke; 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; ot->poll= ED_operator_scene_editable;
/* flags */ /* flags */

@ -345,7 +345,7 @@ DEF_ICON(ICON_MESH_UVSPHERE)
DEF_ICON(ICON_MESH_ICOSPHERE) DEF_ICON(ICON_MESH_ICOSPHERE)
DEF_ICON(ICON_MESH_GRID) DEF_ICON(ICON_MESH_GRID)
DEF_ICON(ICON_MESH_MONKEY) DEF_ICON(ICON_MESH_MONKEY)
DEF_ICON(ICON_MESH_TUBE) DEF_ICON(ICON_MESH_CYLINDER)
DEF_ICON(ICON_MESH_TORUS) DEF_ICON(ICON_MESH_TORUS)
DEF_ICON(ICON_MESH_CONE) DEF_ICON(ICON_MESH_CONE)
DEF_ICON(ICON_BLANK610) DEF_ICON(ICON_BLANK610)
@ -362,14 +362,14 @@ DEF_ICON(ICON_META_PLANE)
DEF_ICON(ICON_META_CUBE) DEF_ICON(ICON_META_CUBE)
DEF_ICON(ICON_META_BALL) DEF_ICON(ICON_META_BALL)
DEF_ICON(ICON_META_ELLIPSOID) DEF_ICON(ICON_META_ELLIPSOID)
DEF_ICON(ICON_META_TUBE) DEF_ICON(ICON_META_CAPSULE)
DEF_ICON(ICON_BLANK625) DEF_ICON(ICON_BLANK625)
/* PRIMITIVES */ /* PRIMITIVES */
DEF_ICON(ICON_SURFACE_NCURVE) DEF_ICON(ICON_SURFACE_NCURVE)
DEF_ICON(ICON_SURFACE_NCIRCLE) DEF_ICON(ICON_SURFACE_NCIRCLE)
DEF_ICON(ICON_SURFACE_NSURFACE) DEF_ICON(ICON_SURFACE_NSURFACE)
DEF_ICON(ICON_SURFACE_NTUBE) DEF_ICON(ICON_SURFACE_NCYLINDER)
DEF_ICON(ICON_SURFACE_NSPHERE) DEF_ICON(ICON_SURFACE_NSPHERE)
DEF_ICON(ICON_SURFACE_NTORUS) DEF_ICON(ICON_SURFACE_NTORUS)
DEF_ICON(ICON_BLANK636) DEF_ICON(ICON_BLANK636)

@ -1265,7 +1265,7 @@ static char *get_mesh_defname(int type)
case PRIM_PLANE: return "Plane"; case PRIM_PLANE: return "Plane";
case PRIM_CUBE: return "Cube"; case PRIM_CUBE: return "Cube";
case PRIM_CIRCLE: return "Circle"; case PRIM_CIRCLE: return "Circle";
case PRIM_CYLINDER: return "Tube"; case PRIM_CYLINDER: return "Cylinder";
case PRIM_CONE: return "Cone"; case PRIM_CONE: return "Cone";
case PRIM_GRID: return "Grid"; case PRIM_GRID: return "Grid";
case PRIM_UVSPHERE: return "Sphere"; case PRIM_UVSPHERE: return "Sphere";
@ -1421,7 +1421,7 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot)
ED_object_add_generic_props(ot, TRUE); 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; int enter_editmode;
unsigned int layer; unsigned int layer;
@ -1439,16 +1439,16 @@ static int add_primitive_tube_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
} }
void MESH_OT_primitive_tube_add(wmOperatorType *ot) void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name= "Add Tube"; ot->name= "Add Cylinder";
ot->description= "Construct a tube mesh"; ot->description= "Construct a cylinder mesh";
ot->idname= "MESH_OT_primitive_tube_add"; ot->idname= "MESH_OT_primitive_cylinder_add";
/* api callbacks */ /* api callbacks */
ot->invoke= ED_object_add_generic_invoke; 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; ot->poll= ED_operator_scene_editable;
/* flags */ /* flags */

@ -71,7 +71,7 @@ void MESH_OT_separate(struct wmOperatorType *ot);
void MESH_OT_primitive_plane_add(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_cube_add(struct wmOperatorType *ot);
void MESH_OT_primitive_circle_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_cone_add(struct wmOperatorType *ot);
void MESH_OT_primitive_grid_add(struct wmOperatorType *ot); void MESH_OT_primitive_grid_add(struct wmOperatorType *ot);
void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot); void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot);

@ -75,7 +75,7 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_primitive_plane_add); WM_operatortype_append(MESH_OT_primitive_plane_add);
WM_operatortype_append(MESH_OT_primitive_cube_add); WM_operatortype_append(MESH_OT_primitive_cube_add);
WM_operatortype_append(MESH_OT_primitive_circle_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_cone_add);
WM_operatortype_append(MESH_OT_primitive_grid_add); WM_operatortype_append(MESH_OT_primitive_grid_add);
WM_operatortype_append(MESH_OT_primitive_monkey_add); WM_operatortype_append(MESH_OT_primitive_monkey_add);

@ -495,7 +495,7 @@ void OBJECT_OT_camera_add(wmOperatorType *ot)
static EnumPropertyItem prop_metaball_types[]= { static EnumPropertyItem prop_metaball_types[]= {
{MB_BALL, "MBALL_BALL", ICON_META_BALL, "Meta Ball", ""}, {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_PLANE, "MBALL_PLANE", ICON_META_PLANE, "Meta Plane", ""},
{MB_CUBE, "MBALL_CUBE", ICON_META_CUBE, "Meta Cube", ""}, {MB_CUBE, "MBALL_CUBE", ICON_META_CUBE, "Meta Cube", ""},
{MB_ELIPSOID, "MBALL_ELLIPSOID", ICON_META_ELLIPSOID, "Meta Ellipsoid", ""}, {MB_ELIPSOID, "MBALL_ELLIPSOID", ICON_META_ELLIPSOID, "Meta Ellipsoid", ""},

@ -140,7 +140,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Meta
static EnumPropertyItem metaelem_type_items[] = { static EnumPropertyItem metaelem_type_items[] = {
{MB_BALL, "BALL", ICON_META_BALL, "Ball", ""}, {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_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""},
{MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, "Ellipsoid", ""}, // NOTE: typo at original definition! {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, "Ellipsoid", ""}, // NOTE: typo at original definition!
{MB_CUBE, "CUBE", ICON_META_CUBE, "Cube", ""}, {MB_CUBE, "CUBE", ICON_META_CUBE, "Cube", ""},