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/__init__.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/__init__.py')
-rw-r--r-- | add_mesh_extra_objects/__init__.py | 168 |
1 files changed, 87 insertions, 81 deletions
diff --git a/add_mesh_extra_objects/__init__.py b/add_mesh_extra_objects/__init__.py index a4290b35..ecc023df 100644 --- a/add_mesh_extra_objects/__init__.py +++ b/add_mesh_extra_objects/__init__.py @@ -16,23 +16,28 @@ # # ##### END GPL LICENSE BLOCK ##### # Contributed to by: -# Pontiac, Fourmadmen, varkenvarken, tuga3d, meta-androcto, metalliandy # -# dreampainter, cotejrp1, liero, Kayo Phoenix, sugiany, dommetysk # -# Phymec, Anthony D'Agostino, Pablo Vazquez, Richard Wilks, lijenstina # -# xyz presets by elfnor +# Pontiac, Fourmadmen, varkenvarken, tuga3d, meta-androcto, metalliandy # +# dreampainter, cotejrp1, liero, Kayo Phoenix, sugiany, dommetysk, Jambay # +# Phymec, Anthony D'Agostino, Pablo Vazquez, Richard Wilks, lijenstina, # +# Sjaak-de-Draak, Phil Cote, cotejrp1, xyz presets by elfnor, revolt_randy, # + bl_info = { "name": "Extra Objects", "author": "Multiple Authors", - "version": (0, 3, 1), + "version": (0, 3, 2), "blender": (2, 74, 5), "location": "View3D > Add > Mesh", "description": "Add extra mesh object types", "warning": "", - "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Add_Extra", + "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/" + "Py/Scripts/Add_Mesh/Add_Extra", "category": "Add Mesh", } +# Note: Blocks has to be loaded before the WallFactory or the script +# will not work properly after (F8) reload + if "bpy" in locals(): import importlib importlib.reload(add_mesh_star) @@ -54,8 +59,8 @@ if "bpy" in locals(): importlib.reload(add_empty_as_parent) importlib.reload(mesh_discombobulator) importlib.reload(add_mesh_beam_builder) - importlib.reload(Wallfactory) importlib.reload(Blocks) + importlib.reload(Wallfactory) importlib.reload(add_shape_geodesic) importlib.reload(forms_271) importlib.reload(geodesic_classes_271) @@ -82,8 +87,8 @@ else: from . import add_empty_as_parent from . import mesh_discombobulator from . import add_mesh_beam_builder - from . import Wallfactory from . import Blocks + from . import Wallfactory from . import add_mesh_triangles from .geodesic_domes import add_shape_geodesic @@ -164,7 +169,8 @@ class INFO_MT_mesh_math_add(Menu): layout.operator("mesh.primitive_xyz_function_surface", text="XYZ Math Surface") self.layout.operator("mesh.primitive_solid_add", text="Regular Solid") - self.layout.operator("mesh.make_triangle", icon = "MESH_DATA") + self.layout.operator("mesh.make_triangle", icon="MESH_DATA") + class INFO_MT_mesh_mech(Menu): # Define the "Math Function" menu @@ -248,97 +254,97 @@ class discombobulator_scene_props(bpy.types.PropertyGroup): DISC_doodads = [] # Protusions Buttons: repeatprot = IntProperty( - name="Repeat protusions", - description=("Make several layers of protusion \n" - "Use carefully, runs recursively the discombulator"), - default=1, min=1, max=4 # set to 4 because it's 2**n reqursive - ) + name="Repeat protusions", + description=("Make several layers of protusion \n" + "Use carefully, runs recursively the discombulator"), + default=1, min=1, max=4 # set to 4 because it's 2**n reqursive + ) doprots = BoolProperty( - name="Make protusions", - description="Check if we want to add protusions to the mesh", - default=True - ) + name="Make protusions", + description="Check if we want to add protusions to the mesh", + default=True + ) subpolygon1 = BoolProperty( - name="1", - default=True - ) + name="1", + default=True + ) subpolygon2 = BoolProperty( - name="2", - default=True - ) + name="2", + default=True + ) subpolygon3 = BoolProperty( - name="3", - default=True - ) + name="3", + default=True + ) subpolygon4 = BoolProperty( - name="4", - default=True - ) + name="4", + default=True + ) polygonschangedpercent = FloatProperty( - name="Polygon %", - description="Percentage of changed polygons", - default=1.0 - ) + name="Polygon %", + description="Percentage of changed polygons", + default=1.0 + ) minHeight = FloatProperty( - name="Min height", - description="Minimal height of the protusions", - default=0.2 - ) + name="Min height", + description="Minimal height of the protusions", + default=0.2 + ) maxHeight = FloatProperty( - name="Max height", - description="Maximal height of the protusions", - default=0.4 - ) + name="Max height", + description="Maximal height of the protusions", + default=0.4 + ) minTaper = FloatProperty( - name="Min taper", - description="Minimal height of the protusions", - default=0.15, min=0.0, max=1.0, - subtype='PERCENTAGE' - ) + name="Min taper", + description="Minimal height of the protusions", + default=0.15, min=0.0, max=1.0, + subtype='PERCENTAGE' + ) maxTaper = FloatProperty( - name="Max taper", - description="Maximal height of the protusions", - default=0.35, min=0.0, max=1.0, - subtype='PERCENTAGE' - ) + name="Max taper", + description="Maximal height of the protusions", + default=0.35, min=0.0, max=1.0, + subtype='PERCENTAGE' + ) # Doodads buttons: dodoodads = BoolProperty( - name="Make doodads", - description="Check if we want to generate doodads", - default=False - ) + name="Make doodads", + description="Check if we want to generate doodads", + default=False + ) mindoodads = IntProperty( - name="Minimum doodads number", - description="Ask for the minimum number of doodads to generate per polygon", - default=1, min=0, max=50 - ) + name="Minimum doodads number", + description="Ask for the minimum number of doodads to generate per polygon", + default=1, min=0, max=50 + ) maxdoodads = IntProperty( - name="Maximum doodads number", - description="Ask for the maximum number of doodads to generate per polygon", - default=6, min=1, max=50 - ) + name="Maximum doodads number", + description="Ask for the maximum number of doodads to generate per polygon", + default=6, min=1, max=50 + ) doodMinScale = FloatProperty( - name="Scale min", description="Minimum scaling of doodad", - default=0.5, min=0.0, max=1.0, - subtype='PERCENTAGE' - ) + name="Scale min", description="Minimum scaling of doodad", + default=0.5, min=0.0, max=1.0, + subtype='PERCENTAGE' + ) doodMaxScale = FloatProperty( - name="Scale max", - description="Maximum scaling of doodad", - default=1.0, min=0.0, max=1.0, - subtype='PERCENTAGE' - ) + name="Scale max", + description="Maximum scaling of doodad", + default=1.0, min=0.0, max=1.0, + subtype='PERCENTAGE' + ) # Materials buttons: sideProtMat = IntProperty( - name="Side's prot mat", - description="Material of protusion's sides", - default=0, min=0 - ) + name="Side's prot mat", + description="Material of protusion's sides", + default=0, min=0 + ) topProtMat = IntProperty( - name="Prot's top mat", - description="Material of protusion's top", - default=0, min=0 - ) + name="Prot's top mat", + description="Material of protusion's top", + default=0, min=0 + ) # Register all operators and panels |