-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path__init__.py
75 lines (61 loc) · 2.52 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
'''
BEGIN GPL LICENSE BLOCK
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
END GPL LICENSE BLOCK
'''
bl_info = {
"name": "Exact Edit",
"author": "nBurn",
"version": (0, 2, 0),
"blender": (2, 77, 0),
"location": "View3D",
"description": "Tool for precisely setting distance, scale, and rotation",
"wiki_url": "https://github.com/n-Burn/Exact_Edit/wiki",
"category": "Object"
}
if "bpy" in locals():
import importlib
importlib.reload(xedit_set_meas)
importlib.reload(xedit_free_rotate)
else:
from . import xedit_set_meas
from . import xedit_free_rotate
import bpy
class XEditPanel(bpy.types.Panel):
# Creates a panel in the 3d view Toolshelf window
bl_label = 'Exact Edit'
bl_idname = 'xedit_base_panel'
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
#bl_context = 'objectmode'
bl_category = 'Tools'
def draw(self, context):
#layout = self.layout
row = self.layout.row(True)
col = row.column()
col.operator("view3d.xedit_set_meas_op", text="Set Measure", icon="EDIT")
col.operator("view3d.xedit_free_rotate_op", text="Free Rotate", icon="FORCE_MAGNETIC")
def register():
bpy.utils.register_class(xedit_set_meas.XEditStoreMeasBtn)
bpy.utils.register_class(xedit_set_meas.XEditMeasureInputPanel)
bpy.utils.register_class(xedit_set_meas.XEditSetMeas)
bpy.utils.register_class(xedit_free_rotate.XEditFreeRotate)
bpy.utils.register_class(XEditPanel)
def unregister():
bpy.utils.unregister_class(xedit_set_meas.XEditStoreMeasBtn)
bpy.utils.unregister_class(xedit_set_meas.XEditMeasureInputPanel)
bpy.utils.unregister_class(xedit_set_meas.XEditSetMeas)
bpy.utils.unregister_class(xedit_free_rotate.XEditFreeRotate)
bpy.utils.unregister_class(XEditPanel)
if __name__ == "__main__":
register()