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 /io_mesh_stl
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 'io_mesh_stl')
-rw-r--r--io_mesh_stl/__init__.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py
index 1858c17b..6a0154e6 100644
--- a/io_mesh_stl/__init__.py
+++ b/io_mesh_stl/__init__.py
@@ -50,7 +50,17 @@ bl_addon_info = {
import bpy
from bpy.props import *
-from io_mesh_stl import stl_utils, blender_utils
+
+try:
+ init_data
+
+ reload(stl_utils)
+ reload(blender_utils)
+except:
+ from io_mesh_stl import stl_utils
+ from io_mesh_stl import blender_utils
+
+init_data = True
class StlImporter(bpy.types.Operator):
@@ -135,15 +145,11 @@ def menu_export(self, context):
def register():
- bpy.types.register(StlImporter)
- bpy.types.register(StlExporter)
bpy.types.INFO_MT_file_import.append(menu_import)
bpy.types.INFO_MT_file_export.append(menu_export)
def unregister():
- bpy.types.unregister(StlImporter)
- bpy.types.unregister(StlExporter)
bpy.types.INFO_MT_file_import.remove(menu_import)
bpy.types.INFO_MT_file_export.remove(menu_export)