update templates for registration changes
[blender.git] / release / scripts / templates / operator_mesh_add.py
index db614f3a74c6f3ea4767c6aed96ffa796fc80d52..77d172b3068cde22f38f0b23633992470c1466b5 100644 (file)
@@ -91,11 +91,16 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_class(AddBox)
     bpy.types.INFO_MT_mesh_add.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_class(AddBox)
     bpy.types.INFO_MT_mesh_add.remove(menu_func)
 
 if __name__ == "__main__":
+    register()
+
+    # test call
     bpy.ops.mesh.primitive_box_add()