Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendon Murphy <meta.androcto1@gmail.com>2014-08-04 18:31:22 +0400
committerBrendon Murphy <meta.androcto1@gmail.com>2014-08-04 18:31:22 +0400
commit263763f2d120000c9d75777afe299418335b4adb (patch)
tree378df844b21ec5cd8a154c70454140471ec758ac /add_mesh_extra_objects/add_mesh_twisted_torus.py
parentc2d1f06c06097965abdb00bcda557704d917dd19 (diff)
updates & cleanup, merged pipe joints & solid objects, cleaner integration into shift/a
Diffstat (limited to 'add_mesh_extra_objects/add_mesh_twisted_torus.py')
-rw-r--r--add_mesh_extra_objects/add_mesh_twisted_torus.py23
1 files changed, 4 insertions, 19 deletions
diff --git a/add_mesh_extra_objects/add_mesh_twisted_torus.py b/add_mesh_extra_objects/add_mesh_twisted_torus.py
index fd3cb5e8..2392a293 100644
--- a/add_mesh_extra_objects/add_mesh_twisted_torus.py
+++ b/add_mesh_extra_objects/add_mesh_twisted_torus.py
@@ -19,35 +19,22 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENCE BLOCK *****
-"""
-bl_info = {
- "name": "Twisted Torus",
- "author": "Paulo_Gomes",
- "version": (0, 11, 1),
- "blender": (2, 57, 0),
- "location": "View3D > Add > Mesh ",
- "description": "Adds a mesh Twisted Torus to the Add Mesh menu",
- "warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
- "Scripts/Add_Mesh/Add_Twisted_Torus",
- "category": "Add Mesh",
-}
+#twisted torus by Paulo_Gomes
+# "version": (0, 11, 1)
+"""
Usage:
* Launch from Add Mesh menu
* Modify parameters as desired or keep defaults
"""
-
-
import bpy
from bpy.props import *
from mathutils import *
from math import cos, sin, pi
-
# Create a new mesh (object) from verts/edges/faces.
# verts/edges/faces ... List of vertices/edges/faces for the
# new mesh (as used in from_pydata).
@@ -79,6 +66,7 @@ def create_mesh_object(context, verts, edges, faces, name):
# a fan/star of faces.
# Note: If both vertex idx list are the same length they have
# to have at least 2 vertices.
+
def createFaces(vertIdx1, vertIdx2, closed=False, flipped=False):
faces = []
@@ -134,7 +122,6 @@ def createFaces(vertIdx1, vertIdx2, closed=False, flipped=False):
return faces
-
def add_twisted_torus(major_rad, minor_rad, major_seg, minor_seg, twists):
PI_2 = pi * 2.0
z_axis = (0.0, 0.0, 1.0)
@@ -179,7 +166,6 @@ def add_twisted_torus(major_rad, minor_rad, major_seg, minor_seg, twists):
return verts, faces
-
class AddTwistedTorus(bpy.types.Operator):
"""Add a torus mesh"""
bl_idname = "mesh.primitive_twisted_torus_add"
@@ -245,4 +231,3 @@ class AddTwistedTorus(bpy.types.Operator):
obj = create_mesh_object(context, verts, [], faces, "TwistedTorus")
return {'FINISHED'}
-