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:
authorlijenstina <lijenstina@gmail.com>2017-06-10 00:06:28 +0300
committerlijenstina <lijenstina@gmail.com>2017-06-10 00:06:28 +0300
commitaa8f255c0eaf31b2665d6adf0569da4892d8d1a4 (patch)
treec2bfef22a0c8b3329d45e93f8722b2e2f3884c90 /add_mesh_extra_objects/add_mesh_teapot.py
parent84baf76f48e023eafde8d567490b7b0ba901e9fb (diff)
Add Mesh Extra Objects: Update, Fix crash with Wall Factory
Bumped version to 0.3.2 Wall Factory: Fix crash with Wall Factory when openings and slots are enabled (unorderable types: opening() < opening()) with the repeat option on as the sort function compared stored classes instead of the numerical values Fix the module not working properly after (F8) reload Cleanup - consistent prop definitions Remove star imports Small UI reorganization to save vertical space The code will probably need some further refactor as the usage of globals is not so clear add_mesh_triangles: cleanup, remove unused vars add missing GPL notice, some UI tweaks, add tooltip add_mesh_pyramid: indentation cleanup add_mesh_beam_builder: add an option to snap to cursor add_mesh_teapot: use defs instead of assigning lambdas (E731)
Diffstat (limited to 'add_mesh_extra_objects/add_mesh_teapot.py')
-rw-r--r--add_mesh_extra_objects/add_mesh_teapot.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/add_mesh_extra_objects/add_mesh_teapot.py b/add_mesh_extra_objects/add_mesh_teapot.py
index 27e7f703..23dd084f 100644
--- a/add_mesh_extra_objects/add_mesh_teapot.py
+++ b/add_mesh_extra_objects/add_mesh_teapot.py
@@ -5,9 +5,7 @@ from bpy.props import (
IntProperty,
EnumProperty,
)
-
import mathutils
-
import io
import operator
import functools
@@ -111,10 +109,19 @@ def patches_to_raw(patches, resolution):
def make_bezier(ctrlpnts, resolution):
- b1 = lambda t: t * t * t
- b2 = lambda t: 3.0 * t * t * (1.0 - t)
- b3 = lambda t: 3.0 * t * (1.0 - t) * (1.0 - t)
- b4 = lambda t: (1.0 - t) * (1.0 - t) * (1.0 - t)
+
+ def b1(t):
+ return t * t * t
+
+ def b2(t):
+ return 3.0 * t * t * (1.0 - t)
+
+ def b3(t):
+ return 3.0 * t * (1.0 - t) * (1.0 - t)
+
+ def b4(t):
+ return (1.0 - t) * (1.0 - t) * (1.0 - t)
+
p1, p2, p3, p4 = map(mathutils.Vector, ctrlpnts)
def makevert(t):