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:
authorzeffii <tetha.z@gmail.com>2017-12-26 14:12:46 +0300
committerzeffii <tetha.z@gmail.com>2017-12-26 14:12:46 +0300
commit81d846baa2ebabadbda74b0f843fbf5ec7c268e0 (patch)
treef36db39a781f3b32b6eff2163c076e69bef1cf07 /mesh_tiny_cad
parent05688be3becab61a2a78f4faed8ae7198e2d6180 (diff)
removed register.module usage
Diffstat (limited to 'mesh_tiny_cad')
-rw-r--r--mesh_tiny_cad/BIX.py8
-rw-r--r--mesh_tiny_cad/CCEN.py8
-rw-r--r--mesh_tiny_cad/CFG.py8
-rw-r--r--mesh_tiny_cad/E2F.py8
-rw-r--r--mesh_tiny_cad/V2X.py8
-rw-r--r--mesh_tiny_cad/VTX.py8
-rw-r--r--mesh_tiny_cad/XALL.py8
-rw-r--r--mesh_tiny_cad/__init__.py17
8 files changed, 14 insertions, 59 deletions
diff --git a/mesh_tiny_cad/BIX.py b/mesh_tiny_cad/BIX.py
index faac5212..89908f60 100644
--- a/mesh_tiny_cad/BIX.py
+++ b/mesh_tiny_cad/BIX.py
@@ -92,11 +92,3 @@ class TCLineOnBisection(bpy.types.Operator):
def execute(self, context):
add_line_to_bisection(self)
return {'FINISHED'}
-
-
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
diff --git a/mesh_tiny_cad/CCEN.py b/mesh_tiny_cad/CCEN.py
index f625504b..ef2b5eae 100644
--- a/mesh_tiny_cad/CCEN.py
+++ b/mesh_tiny_cad/CCEN.py
@@ -157,11 +157,3 @@ class TCCircleCenter(bpy.types.Operator):
def execute(self, context):
dispatch(context, mode=1)
return {'FINISHED'}
-
-
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
diff --git a/mesh_tiny_cad/CFG.py b/mesh_tiny_cad/CFG.py
index ed703a2f..55e0ff9f 100644
--- a/mesh_tiny_cad/CFG.py
+++ b/mesh_tiny_cad/CFG.py
@@ -74,11 +74,3 @@ def unregister_icons():
for pcoll in icon_collection.values():
bpy.utils.previews.remove(pcoll)
icon_collection.clear()
-
-
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
diff --git a/mesh_tiny_cad/E2F.py b/mesh_tiny_cad/E2F.py
index 8c95f126..25f17e9f 100644
--- a/mesh_tiny_cad/E2F.py
+++ b/mesh_tiny_cad/E2F.py
@@ -100,11 +100,3 @@ class TCEdgeToFace(bpy.types.Operator):
def execute(self, context):
extend_vertex(self)
return {'FINISHED'}
-
-
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
diff --git a/mesh_tiny_cad/V2X.py b/mesh_tiny_cad/V2X.py
index c230f4a2..c8683297 100644
--- a/mesh_tiny_cad/V2X.py
+++ b/mesh_tiny_cad/V2X.py
@@ -60,11 +60,3 @@ class TCVert2Intersection(bpy.types.Operator):
def execute(self, context):
add_vertex_to_intersection()
return {'FINISHED'}
-
-
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
diff --git a/mesh_tiny_cad/VTX.py b/mesh_tiny_cad/VTX.py
index 5ad035b2..5cdb2fcf 100644
--- a/mesh_tiny_cad/VTX.py
+++ b/mesh_tiny_cad/VTX.py
@@ -173,11 +173,3 @@ class TCAutoVTX(bpy.types.Operator):
bmesh.update_edit_mesh(me, True)
return {'FINISHED'}
-
-
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
diff --git a/mesh_tiny_cad/XALL.py b/mesh_tiny_cad/XALL.py
index 83ecdb52..fc0ed76e 100644
--- a/mesh_tiny_cad/XALL.py
+++ b/mesh_tiny_cad/XALL.py
@@ -174,11 +174,3 @@ class TCIntersectAllEdges(bpy.types.Operator):
print('must be in edit mode')
return {'FINISHED'}
-
-
-def register():
- bpy.utils.register_module(__name__)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
diff --git a/mesh_tiny_cad/__init__.py b/mesh_tiny_cad/__init__.py
index 611c67c4..4a9a62f0 100644
--- a/mesh_tiny_cad/__init__.py
+++ b/mesh_tiny_cad/__init__.py
@@ -50,7 +50,7 @@ if "bpy" in locals():
import bpy
-from .CFG import TinyCADProperties
+from .CFG import TinyCADProperties, VIEW3D_MT_edit_mesh_tinycad
from .CFG import register_icons, unregister_icons
from . import VTX, V2X, XALL, BIX, CCEN, E2F
@@ -59,10 +59,20 @@ def menu_func(self, context):
self.layout.menu("VIEW3D_MT_edit_mesh_tinycad")
self.layout.separator()
+classes = [
+ TinyCADProperties, VIEW3D_MT_edit_mesh_tinycad,
+ VTX.TCAutoVTX,
+ XALL.TCIntersectAllEdges,
+ V2X.TCVert2Intersection,
+ E2F.TCEdgeToFace,
+ CCEN.TCCallBackCCEN, CCEN.TCCircleCenter,
+ BIX.TCLineOnBisection
+]
def register():
register_icons()
- bpy.utils.register_module(__name__)
+ for cls in classes:
+ bpy.utils.register_class(cls)
bpy.types.Scene.tinycad_props = bpy.props.PointerProperty(
name="TinyCAD props", type=TinyCADProperties)
bpy.types.VIEW3D_MT_edit_mesh_specials.prepend(menu_func)
@@ -70,6 +80,7 @@ def register():
def unregister():
bpy.types.VIEW3D_MT_edit_mesh_specials.remove(menu_func)
- bpy.utils.unregister_module(__name__)
+ for cls in reversed(classes):
+ bpy.utils.unregister_class(cls)
del bpy.types.Scene.tinycad_props
unregister_icons()