[Bf-extensions-cvs] [9dd1799] master: discombobulator: remove panel, replace with menu item/pop up

meta-androcto noreply at git.blender.org
Wed Jun 29 05:38:33 CEST 2016


Commit: 9dd17998ca72cdc1abce8e9e9cff8b82798244e2
Author: meta-androcto
Date:   Wed Jun 29 13:37:54 2016 +1000
Branches: master
https://developer.blender.org/rBA9dd17998ca72cdc1abce8e9e9cff8b82798244e2

discombobulator: remove panel, replace with menu item/pop up

===================================================================

M	add_mesh_extra_objects/__init__.py
M	add_mesh_extra_objects/mesh_discombobulator.py

===================================================================

diff --git a/add_mesh_extra_objects/__init__.py b/add_mesh_extra_objects/__init__.py
index 069a959..df2531f 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 75f9381..69e7a88 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:



More information about the Bf-extensions-cvs mailing list