diff options
author | Brendon Murphy <meta.androcto1@gmail.com> | 2014-08-12 21:22:48 +0400 |
---|---|---|
committer | Brendon Murphy <meta.androcto1@gmail.com> | 2014-08-12 21:23:32 +0400 |
commit | 16a2f1cca0c436d09b5043d123980a111dcdf31e (patch) | |
tree | 035d46f2b2ff1214fd6abe974414f80ecf6f2fdc /add_curve_extra_objects | |
parent | 5a732fdf711abbf283986d7a7351ecce8b4d53ab (diff) |
remove menu level for cleaner integration.
Diffstat (limited to 'add_curve_extra_objects')
-rw-r--r-- | add_curve_extra_objects/__init__.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/add_curve_extra_objects/__init__.py b/add_curve_extra_objects/__init__.py index fab9f383..1807f0d1 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__) |