-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
72 lines (54 loc) · 1.88 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
import bpy
from .textureblender.ops import ImageNodeFileImporter, LayoutNodesOperator, HideNodesOperator, UnhideNodesOperator, \
FrameImageSetOperator, GroupImageSetOperator, ConnectActiveToSelectedOperator, ConnectSelectedToActiveOperator, \
ShaderTexImageMultiEditOperator
from .textureblender.panels import TextureSetSetupPanel, LayoutNodesFileBrowserPanel, LayoutNodesPanel, \
DynamicFormatPanel, ConnectNodesPanel
bl_info = {
'version': (0, 1),
'blender': (2, 80, 0),
'author': 'Florian Friedrich (@narranoid)',
'name': 'Texture Grapher',
'location': 'Node Editor > Sidebar > Texture Grapher',
'description': 'Texturing workflow utilities',
'warning': 'This is a Beta release! Use at your own risk!',
'category': 'Material',
}
classes = [
# Operators
ImageNodeFileImporter,
LayoutNodesOperator,
HideNodesOperator,
UnhideNodesOperator,
FrameImageSetOperator,
GroupImageSetOperator,
ConnectActiveToSelectedOperator,
ConnectSelectedToActiveOperator,
ShaderTexImageMultiEditOperator,
# Panels
TextureSetSetupPanel,
LayoutNodesPanel,
LayoutNodesFileBrowserPanel,
DynamicFormatPanel,
ConnectNodesPanel
]
addon_keymaps = []
def register():
from bpy.utils import register_class
for cls in classes:
register_class(cls)
wm = bpy.context.window_manager
kc = wm.keyconfigs.addon
if kc:
km = kc.keymaps.new(name='Node Editor', space_type='NODE_EDITOR')
kmi = km.keymap_items.new("texture_grapher.shader_tex_image_multi_edit", type='I', value='PRESS')
addon_keymaps.append((km, kmi))
def unregister():
for km, kmi in addon_keymaps:
km.keymap_items.itmes.remove(kmi)
addon_keymaps.clear()
from bpy.utils import unregister_class
for cls in reversed(classes):
unregister_class(cls)
if __name__ == "__main__":
register()