Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-02 15:53:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-02 15:53:48 +0400
commit3148c0f203ba23bead40e4e037bcc9a1eb27278b (patch)
tree1e91d053095e10a4b7afa1c392bb7525d3967cbe /add_mesh_3d_function_surface.py
parentd566152b0372d1d29578c3353f6a4d5ff3af4d63 (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.py21
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)