1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # ##### END GPL LICENSE BLOCK #####
23 "name": "tinyCAD Mesh tools",
24 "author": "zeffii (aka Dealga McArdle)",
26 "blender": (2, 80, 0),
28 "location": "View3D > EditMode Context Menu",
29 "wiki_url": "http://zeffii.github.io/mesh_tiny_cad/",
30 "tracker_url": "https://github.com/zeffii/mesh_tiny_cad/issues"
37 print('tinyCAD: detected reload event.')
41 modules
= (CFG
, VTX
, V2X
, XALL
, BIX
, CCEN
, E2F
)
44 print("tinyCAD: reloaded modules, all systems operational")
46 except Exception as E
:
47 print('reload failed with error:')
53 from .CFG
import TinyCADProperties
, VIEW3D_MT_edit_mesh_tinycad
54 from .CFG
import register_icons
, unregister_icons
55 from . import VTX
, V2X
, XALL
, BIX
, CCEN
, E2F
58 def menu_func(self
, context
):
59 self
.layout
.menu("VIEW3D_MT_edit_mesh_tinycad")
60 self
.layout
.separator()
63 TinyCADProperties
, VIEW3D_MT_edit_mesh_tinycad
,
65 XALL
.TCIntersectAllEdges
,
66 V2X
.TCVert2Intersection
,
68 CCEN
.TCCallBackCCEN
, CCEN
.TCCircleCenter
,
75 bpy
.utils
.register_class(cls
)
76 bpy
.types
.Scene
.tinycad_props
= bpy
.props
.PointerProperty(
77 name
="TinyCAD props", type=TinyCADProperties
)
78 bpy
.types
.VIEW3D_MT_edit_mesh_context_menu
.prepend(menu_func
)
82 bpy
.types
.VIEW3D_MT_edit_mesh_context_menu
.remove(menu_func
)
83 for cls
in reversed(classes
):
84 bpy
.utils
.unregister_class(cls
)
85 del bpy
.types
.Scene
.tinycad_props