diff options
author | lijenstina <lijenstina@gmail.com> | 2017-06-10 00:06:28 +0300 |
---|---|---|
committer | lijenstina <lijenstina@gmail.com> | 2017-06-10 00:06:28 +0300 |
commit | aa8f255c0eaf31b2665d6adf0569da4892d8d1a4 (patch) | |
tree | c2bfef22a0c8b3329d45e93f8722b2e2f3884c90 /add_mesh_extra_objects/add_mesh_gemstones.py | |
parent | 84baf76f48e023eafde8d567490b7b0ba901e9fb (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_gemstones.py')
-rw-r--r-- | add_mesh_extra_objects/add_mesh_gemstones.py | 125 |
1 files changed, 64 insertions, 61 deletions
diff --git a/add_mesh_extra_objects/add_mesh_gemstones.py b/add_mesh_extra_objects/add_mesh_gemstones.py index f99bcd43..0da6b488 100644 --- a/add_mesh_extra_objects/add_mesh_gemstones.py +++ b/add_mesh_extra_objects/add_mesh_gemstones.py @@ -2,7 +2,10 @@ import bpy from bpy.types import Operator -from mathutils import Vector, Quaternion +from mathutils import ( + Vector, + Quaternion, + ) from math import cos, sin, pi from bpy.props import ( FloatProperty, @@ -209,40 +212,40 @@ class AddDiamond(Operator): bl_options = {'REGISTER', 'UNDO', 'PRESET'} segments = IntProperty( - name="Segments", - description="Number of segments for the diamond", - min=3, - max=256, - default=32 - ) + name="Segments", + description="Number of segments for the diamond", + min=3, + max=256, + default=32 + ) girdle_radius = FloatProperty( - name="Girdle Radius", - description="Girdle radius of the diamond", - min=0.01, - max=9999.0, - default=1.0 - ) + name="Girdle Radius", + description="Girdle radius of the diamond", + min=0.01, + max=9999.0, + default=1.0 + ) table_radius = FloatProperty( - name="Table Radius", - description="Girdle radius of the diamond", - min=0.01, - max=9999.0, - default=0.6 - ) + name="Table Radius", + description="Girdle radius of the diamond", + min=0.01, + max=9999.0, + default=0.6 + ) crown_height = FloatProperty( - name="Crown Height", - description="Crown height of the diamond", - min=0.01, - max=9999.0, - default=0.35 - ) + name="Crown Height", + description="Crown height of the diamond", + min=0.01, + max=9999.0, + default=0.35 + ) pavilion_height = FloatProperty( - name="Pavilion Height", - description="Pavilion height of the diamond", - min=0.01, - max=9999.0, - default=0.8 - ) + name="Pavilion Height", + description="Pavilion height of the diamond", + min=0.01, + max=9999.0, + default=0.8 + ) def execute(self, context): verts, faces = add_diamond(self.segments, @@ -263,40 +266,40 @@ class AddGem(Operator): bl_options = {'REGISTER', 'UNDO', 'PRESET'} segments = IntProperty( - name="Segments", - description="Longitudial segmentation", - min=3, - max=265, - default=8 - ) + name="Segments", + description="Longitudial segmentation", + min=3, + max=265, + default=8 + ) pavilion_radius = FloatProperty( - name="Radius", - description="Radius of the gem", - min=0.01, - max=9999.0, - default=1.0 - ) + name="Radius", + description="Radius of the gem", + min=0.01, + max=9999.0, + default=1.0 + ) crown_radius = FloatProperty( - name="Table Radius", - description="Radius of the table(top)", - min=0.01, - max=9999.0, - default=0.6 - ) + name="Table Radius", + description="Radius of the table(top)", + min=0.01, + max=9999.0, + default=0.6 + ) crown_height = FloatProperty( - name="Table height", - description="Height of the top half", - min=0.01, - max=9999.0, - default=0.35 - ) + name="Table height", + description="Height of the top half", + min=0.01, + max=9999.0, + default=0.35 + ) pavilion_height = FloatProperty( - name="Pavilion height", - description="Height of bottom half", - min=0.01, - max=9999.0, - default=0.8 - ) + name="Pavilion height", + description="Height of bottom half", + min=0.01, + max=9999.0, + default=0.8 + ) def execute(self, context): # create mesh |