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:
authormeta-androcto <meta.androcto1@gmail.com>2016-06-29 06:37:54 +0300
committermeta-androcto <meta.androcto1@gmail.com>2016-06-29 06:37:54 +0300
commit9dd17998ca72cdc1abce8e9e9cff8b82798244e2 (patch)
treec62d77e17687757a740b60c7b8417e97e5d0497a
parent1e324200855b7f9f7649856faf28581204fb499c (diff)
discombobulator: remove panel, replace with menu item/pop up
-rw-r--r--add_mesh_extra_objects/__init__.py1
-rw-r--r--add_mesh_extra_objects/mesh_discombobulator.py36
2 files changed, 19 insertions, 18 deletions
diff --git a/add_mesh_extra_objects/__init__.py b/add_mesh_extra_objects/__init__.py
index 069a959c..df2531f3 100644
--- a/add_mesh_extra_objects/__init__.py
+++ b/add_mesh_extra_objects/__init__.py
@@ -221,6 +221,7 @@ def menu_func(self, context):
self.layout.operator("mesh.primitive_round_cube_add", text="Round Cube", icon="MOD_SUBSURF")
self.layout.menu("INFO_MT_mesh_math_add", text="Math Function", icon="PACKAGE")
self.layout.operator("mesh.generate_geodesic_dome", text="Geodesic Dome",icon="MESH_ICOSPHERE")
+ self.layout.operator("discombobulate.ops", text="Discombobulator",icon="MESH_ICOSPHERE")
self.layout.menu("INFO_MT_mesh_pipe_joints_add", text="Pipe Joints", icon="SNAP_PEEL_OBJECT")
self.layout.menu("INFO_MT_mesh_gears_add", text="Gears", icon="SCRIPTWIN")
self.layout.menu("INFO_MT_mesh_torus_add", text="Torus Objects", icon="MESH_TORUS")
diff --git a/add_mesh_extra_objects/mesh_discombobulator.py b/add_mesh_extra_objects/mesh_discombobulator.py
index 75f9381f..69e7a88c 100644
--- a/add_mesh_extra_objects/mesh_discombobulator.py
+++ b/add_mesh_extra_objects/mesh_discombobulator.py
@@ -563,31 +563,27 @@ class discombobulator(bpy.types.Operator):
return {'FINISHED'}
class discombob_help(bpy.types.Operator):
- bl_idname = 'help.discombobulator'
- bl_label = ''
+ bl_idname = 'help.discombobulator'
+ bl_label = ''
- def draw(self, context):
- layout = self.layout
- layout.label('To use:')
- layout.label('Works with Quads only not Ngons.')
- layout.label('Select a face or faces')
- layout.label('Press Discombobulate to create greebles')
+ def draw(self, context):
+ layout = self.layout
+ layout.label('To use:')
+ layout.label('Works with Quads only not Ngons.')
+ layout.label('Select a face or faces')
+ layout.label('Press Discombobulate to create greebles')
- def execute(self, context):
- return {'FINISHED'}
+ def execute(self, context):
+ return {'FINISHED'}
- def invoke(self, context, event):
- return context.window_manager.invoke_popup(self, width = 300)
+ def invoke(self, context, event):
+ return context.window_manager.invoke_popup(self, width = 300)
-class VIEW3D_PT_tools_discombobulate(bpy.types.Panel):
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
+class VIEW3D_PT_tools_discombobulate(bpy.types.Operator):
+ bl_idname = 'discombobulate.ops'
bl_label = "Discombobulator"
- bl_context = "objectmode"
- bl_options = {'DEFAULT_CLOSED'}
- bl_category = "Create"
def draw(self, context):
layout = self.layout
@@ -640,7 +636,11 @@ class VIEW3D_PT_tools_discombobulate(bpy.types.Panel):
row = box.row()
row.prop(context.scene, "sideProtMat")
row = box.row()
+ def execute(self, context):
+ return {'FINISHED'}
+ def invoke(self, context, event):
+ return context.window_manager.invoke_popup(self, width = 300)
# registering and menu integration
def register():
# Protusions Buttons: