Better default resolutions for UV Sphere and Torus primitives (nice square

faces)
Torus is generated flat shaded like the rest of primitives for easier
tweaking of resolution and consistency with the rest of the primitives
This commit is contained in:
Daniel Salazar 2010-02-09 21:05:59 +00:00
parent 68bb7e38ab
commit 6d833bced2
2 changed files with 3 additions and 2 deletions

@ -92,7 +92,7 @@ class AddTorus(bpy.types.Operator):
default=48, min=3, max=256)
minor_segments = IntProperty(name="Minor Segments",
description="Number of segments for the minor ring of the torus",
default=16, min=3, max=256)
default=12, min=3, max=256)
use_abso = BoolProperty(name="Use Int+Ext Controls",
description="Use the Int / Ext controls for torus dimensions",
default=False)
@ -121,6 +121,7 @@ class AddTorus(bpy.types.Operator):
mesh.add_geometry(int(len(verts_loc) / 3), 0, int(len(faces) / 4))
mesh.verts.foreach_set("co", verts_loc)
mesh.faces.foreach_set("verts_raw", faces)
mesh.faces.foreach_set("smooth", [False] * len(mesh.faces))
scene = context.scene

@ -1593,7 +1593,7 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot)
/* props */
RNA_def_int(ot->srna, "segments", 32, INT_MIN, INT_MAX, "Segments", "", 3, 500);
RNA_def_int(ot->srna, "rings", 24, INT_MIN, INT_MAX, "Rings", "", 3, 500);
RNA_def_int(ot->srna, "rings", 16, INT_MIN, INT_MAX, "Rings", "", 3, 500);
RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, "Size", "", 0.001, 100.00);
ED_object_add_generic_props(ot, TRUE);