From 3148c0f203ba23bead40e4e037bcc9a1eb27278b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 2 Aug 2010 11:53:48 +0000 Subject: update addons to work with new register/unregister method, These scritps still need changes related to parent classes - mesh_surface_sketch.py - render_renderfarmfi.py - space_view3d_align_tools.py - object_cloud_gen.py --- add_curve_torus_knots.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'add_curve_torus_knots.py') diff --git a/add_curve_torus_knots.py b/add_curve_torus_knots.py index 9dc6ac8e..0a79b5a6 100644 --- a/add_curve_torus_knots.py +++ b/add_curve_torus_knots.py @@ -338,25 +338,14 @@ class torus_knot_plus(bpy.types.Operator): ################################################################################ ##### REGISTER ##### -torus_knot_plus_button = (lambda self, context: self.layout.operator - (torus_knot_plus.bl_idname, text="Torus Knot +", icon="PLUGIN")) +def torus_knot_plus_button(self, context): + self.layout.operator(torus_knot_plus.bl_idname, text="Torus Knot +", icon="PLUGIN") -classes = [ -torus_knot_plus - ] def register(): - register = bpy.types.register - for cls in classes: - register(cls) - bpy.types.INFO_MT_curve_add.append(torus_knot_plus_button) def unregister(): - unregister = bpy.types.unregister - for cls in classes: - unregister(cls) - bpy.types.INFO_MT_curve_add.remove(torus_knot_plus_button) if __name__ == "__main__": -- cgit v1.2.3