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:
authorStephen Leger <stephen@3dservices.ch>2017-07-24 17:03:40 +0300
committerStephen Leger <stephen@3dservices.ch>2017-07-24 17:03:52 +0300
commitc992b17be98e245d1d2c7a7ecb557241e10b6f32 (patch)
tree16980b8ef7c657e10d0d08007d041c0b62d1077d
parentbfc1f99bdf433c282127f3f4e8358689dcd5eb9c (diff)
archipack: 2d to 3d warning for shapely and enable in user prefs
-rw-r--r--archipack/__init__.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/archipack/__init__.py b/archipack/__init__.py
index 6b4313ac..6c966614 100644
--- a/archipack/__init__.py
+++ b/archipack/__init__.py
@@ -34,7 +34,7 @@ bl_info = {
'version': (1, 2, 6),
'blender': (2, 7, 8),
'location': 'View3D > Tools > Create > Archipack',
- 'warning': '',
+ 'warning': '2d to 3d require shapely python module (see setup in documentation)',
'wiki_url': 'https://github.com/s-leger/archipack/wiki',
'tracker_url': 'https://github.com/s-leger/archipack/issues',
'link': 'https://github.com/s-leger/archipack',
@@ -97,6 +97,7 @@ else:
print("archipack: ready")
+
# noinspection PyUnresolvedReferences
import bpy
# noinspection PyUnresolvedReferences
@@ -154,6 +155,11 @@ class Archipack_Pref(AddonPreferences):
description="Put Achipack's object into a sub menu (shift+a)",
default=True
)
+ enable_2d_to_3d = BoolProperty(
+ name="Enable 2d to 3d",
+ description="Enable 2d to 3d module",
+ default=False
+ )
max_style_draw_tool = BoolProperty(
name="Draw a wall use 3dsmax style",
description="Reverse clic / release cycle for Draw a wall",
@@ -241,7 +247,15 @@ class Archipack_Pref(AddonPreferences):
col.prop(self, "tools_category")
col.prop(self, "create_category")
col.prop(self, "create_submenu")
- col.prop(self, "max_style_draw_tool")
+ box = layout.box()
+ box.label("Features")
+ box.prop(self, "max_style_draw_tool")
+ box = layout.box()
+ box.label("2d to 3d")
+ if not HAS_POLYLIB:
+ box.label(text="WARNING Shapely python module not found", icon="ERROR")
+ box.label(text="2d to 3d tools are disabled, see setup in documentation")
+ box.prop(self, "enable_2d_to_3d")
box = layout.box()
row = box.row()
split = row.split(percentage=0.5)
@@ -284,8 +298,10 @@ class TOOLS_PT_Archipack_PolyLib(Panel):
def poll(self, context):
global archipack_polylib
- return HAS_POLYLIB and ((archipack_polylib.vars_dict['select_polygons'] is not None) or
- (context.object is not None and context.object.type == 'CURVE'))
+ return (HAS_POLYLIB and
+ context.user_preferences.addons[__name__].preferences.enable_2d_to_3d and
+ ((archipack_polylib.vars_dict['select_polygons'] is not None) or
+ (context.object is not None and context.object.type == 'CURVE')))
def draw(self, context):
global icons_collection