[Bf-extensions-cvs] [16a2f1c] master: remove menu level for cleaner integration.
Brendon Murphy
noreply at git.blender.org
Tue Aug 12 19:23:58 CEST 2014
Commit: 16a2f1cca0c436d09b5043d123980a111dcdf31e
Author: Brendon Murphy
Date: Wed Aug 13 03:22:48 2014 +1000
Branches: master
https://developer.blender.org/rBA16a2f1cca0c436d09b5043d123980a111dcdf31e
remove menu level for cleaner integration.
===================================================================
M add_curve_extra_objects/__init__.py
===================================================================
diff --git a/add_curve_extra_objects/__init__.py b/add_curve_extra_objects/__init__.py
index fab9f38..1807f0d 100644
--- a/add_curve_extra_objects/__init__.py
+++ b/add_curve_extra_objects/__init__.py
@@ -30,7 +30,6 @@ bl_info = {
"Scripts/Curve/Curve_Objects",
"category": "Add Curve"}
-
if "bpy" in locals():
import imp
imp.reload(add_curve_aceous_galore)
@@ -42,16 +41,15 @@ else:
from . import add_curve_spirals
from . import add_curve_torus_knots
-
import bpy
-
class INFO_MT_curve_extras_add(bpy.types.Menu):
# Define the "Extras" menu
- bl_idname = "INFO_MT_curve_extra_objects_add"
+ bl_idname = "curve_extra_objects_add"
bl_label = "Extra Objects"
- def draw(self, context):
+# Define "Extras" menu
+def menu_func(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mesh.curveaceous_galore",
@@ -61,21 +59,12 @@ class INFO_MT_curve_extras_add(bpy.types.Menu):
layout.operator("curve.torus_knot_plus",
text="Torus Knot Plus")
-
-# Register all operators and panels
-
-# Define "Extras" menu
-def menu_func(self, context):
- self.layout.menu("INFO_MT_curve_extra_objects_add", icon="PLUGIN")
-
-
def register():
bpy.utils.register_module(__name__)
# Add "Extras" menu to the "Add Curve" menu
bpy.types.INFO_MT_curve_add.append(menu_func)
-
def unregister():
bpy.utils.unregister_module(__name__)
More information about the Bf-extensions-cvs
mailing list