diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 15:53:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 15:53:48 +0400 |
commit | 3148c0f203ba23bead40e4e037bcc9a1eb27278b (patch) | |
tree | 1e91d053095e10a4b7afa1c392bb7525d3967cbe /add_mesh_3d_function_surface.py | |
parent | d566152b0372d1d29578c3353f6a4d5ff3af4d63 (diff) |
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
Diffstat (limited to 'add_mesh_3d_function_surface.py')
-rw-r--r-- | add_mesh_3d_function_surface.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/add_mesh_3d_function_surface.py b/add_mesh_3d_function_surface.py index 79a01ae4..a8db8d36 100644 --- a/add_mesh_3d_function_surface.py +++ b/add_mesh_3d_function_surface.py @@ -615,31 +615,20 @@ class AddXYZFunctionSurface(bpy.types.Operator): import space_info # Define "3D Function Surface" menu -menu_func_z = (lambda self, context: self.layout.operator( - AddZFunctionSurface.bl_idname, - text="Z Function Surface", - icon="PLUGIN")) -menu_func_xyz = (lambda self, context: self.layout.operator( - AddXYZFunctionSurface.bl_idname, - text="X,Y,Z Function Surface", - icon="PLUGIN")) +def menu_func_z(self, context): + self.layout.operator(AddZFunctionSurface.bl_idname, text="Z Function Surface", icon="PLUGIN") +def menu_func_xyz(self, context): + self.layout.operator(AddXYZFunctionSurface.bl_idname, text="X,Y,Z Function Surface", icon="PLUGIN") -def register(): - # Register the operators/menus. - bpy.types.register(AddZFunctionSurface) - bpy.types.register(AddXYZFunctionSurface) +def register(): # Add menus to the "Add Mesh" menu space_info.INFO_MT_mesh_add.append(menu_func_z) space_info.INFO_MT_mesh_add.append(menu_func_xyz) def unregister(): - # Unregister the operators/menus. - bpy.types.unregister(AddZFunctionSurface) - bpy.types.unregister(AddXYZFunctionSurface) - # Remove menus from the "Add Mesh" menu. space_info.INFO_MT_mesh_add.remove(menu_func_z) space_info.INFO_MT_mesh_add.remove(menu_func_xyz) |