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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/add_mesh_torus.py')
-rw-r--r--release/scripts/add_mesh_torus.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/release/scripts/add_mesh_torus.py b/release/scripts/add_mesh_torus.py
index 4f759256497..2941c56420e 100644
--- a/release/scripts/add_mesh_torus.py
+++ b/release/scripts/add_mesh_torus.py
@@ -6,7 +6,8 @@ Group: 'AddMesh'
"""
import BPyAddMesh
import Blender
-from math import cos, sin, pi
+try: from math import cos, sin, pi
+except: math = None
def add_torus(PREF_MAJOR_RAD, PREF_MINOR_RAD, PREF_MAJOR_SEG, PREF_MINOR_SEG):
Vector = Blender.Mathutils.Vector
@@ -61,5 +62,8 @@ def main():
BPyAddMesh.add_mesh_simple('Torus', verts, [], faces)
-main()
+if cos and sin and pi:
+ main()
+else:
+ Blender.Draw.PupMenu("Error%t|This script requires a full python installation")