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_mesh_twisted_torus.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'add_mesh_twisted_torus.py') diff --git a/add_mesh_twisted_torus.py b/add_mesh_twisted_torus.py index e2f5b89f..525832ff 100644 --- a/add_mesh_twisted_torus.py +++ b/add_mesh_twisted_torus.py @@ -348,18 +348,15 @@ class AddTwistedTorus(bpy.types.Operator): return {'FINISHED'} # Add to the menu -menu_func = (lambda self, - context: self.layout.operator(AddTwistedTorus.bl_idname, - text="Twisted Torus", icon='MESH_DONUT')) +def menu_func(self, context): + self.layout.operator(AddTwistedTorus.bl_idname, text="Twisted Torus", icon='MESH_DONUT') def register(): - bpy.types.register(AddTwistedTorus) bpy.types.INFO_MT_mesh_add.append(menu_func) def unregister(): - bpy.types.unregister(AddTwistedTorus) bpy.types.INFO_MT_mesh_add.remove(menu_func) if __name__ == "__main__": -- cgit v1.2.3