diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-15 01:45:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-15 01:45:56 +0300 |
commit | 6f8ee9b0f9070636bdeb68b86b5b818af2f41f7d (patch) | |
tree | 97b120a5cfefc52713e944eea651abcfb194e2d6 /release/scripts/op | |
parent | 690ad15099fefd3e1f994529149652fde4929c99 (diff) |
patch [#20673] Fixed descriptions in Torus mesh controls, and added some requested controls
from Jaevixa McNomera (jaevixa)
Diffstat (limited to 'release/scripts/op')
-rw-r--r-- | release/scripts/op/add_mesh_torus.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/release/scripts/op/add_mesh_torus.py b/release/scripts/op/add_mesh_torus.py index 865b1d57daf..ccc9a4ba776 100644 --- a/release/scripts/op/add_mesh_torus.py +++ b/release/scripts/op/add_mesh_torus.py @@ -93,9 +93,24 @@ class AddTorus(bpy.types.Operator): minor_segments = IntProperty(name="Minor Segments", description="Number of segments for the minor ring of the torus", default=16, min=3, max=256) + use_abso = BoolProperty(name="Use Int+Ext Controls", + description="Use the Int / Ext controls for torus dimensions", default=False) + abso_major_rad = FloatProperty(name="Exterior Radius", + description="Total Exterior Radius of the torus", + default=1.0, min=0.01, max=100.0) + abso_minor_rad = FloatProperty(name="Inside Radius", + description="Total Interior Radius of the torus", + default=0.5, min=0.01, max=100.0) def execute(self, context): + #deleting between THESE lines makes it re-appear in blender + if self.properties.use_abso == True: + extra_helper = (self.properties.abso_major_rad - self.properties.abso_minor_rad) * 0.5 + self.properties.major_radius = self.properties.abso_minor_rad + extra_helper + self.properties.minor_radius = extra_helper + #deleting between THESE lines makes it re-appear in blender + verts_loc, faces = add_torus(self.properties.major_radius, self.properties.minor_radius, self.properties.major_segments, |