-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
__init__.py
56 lines (48 loc) · 2.12 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
# 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 3 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
# MERCHANTIBILITY 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, see <http://www.gnu.org/licenses/>.
#################################################
# -------------------
# Blender for Science
# -------------------
# Add-on: import-G-code
# Author: Senthur Raj (Github: imsenthur)
# Description: Imports G-code files into Blender 2.80+ as a collection of layers which can then be animated or exported.
# https://github.com/blender-for-science/import-G-code
#################################################
bl_info = {
"name" : "Import-G-code",
"author" : "Senthur Raj",
"description" : "Imports G-code files into Blender 2.80+ as a collection of layers.",
"blender" : (2, 80, 0),
"version" : (1, 1, 0),
"location" : "File > Import-Export",
"warning" : "",
"wiki_url" : "https://github.com/blender-for-science/import-G-code",
"tracker_url" : "https://github.com/blender-for-science/import-G-code/issues",
"category" : "Import-Export"
}
import bpy
from .preferences import IGcodePreferences, IGcodeInstaller
from .processor import ImportGcode
def menu_func_import(self, context):
self.layout.operator(ImportGcode.bl_idname, text="G-code (.gcode)")
def register():
bpy.utils.register_class(IGcodePreferences)
bpy.utils.register_class(IGcodeInstaller)
bpy.utils.register_class(ImportGcode)
bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
def unregister():
bpy.utils.unregister_class(IGcodePreferences)
bpy.utils.unregister_class(IGcodeInstaller)
bpy.utils.unregister_class(ImportGcode)
bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)