-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path__init__.py
executable file
·66 lines (50 loc) · 1.59 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
bl_info = {
"name": "Shelf Made",
"description": "Quick and dirty script shelf panel for Blender",
"author": "Tristan Weis",
"version": (1, 1, 0),
"blender": (3, 3, 1),
"location": "View3D",
"warning": "",
"doc_url": "https://github.com/Plyrolith/shelfmade",
"tracker_url": "https://github.com/Plyrolith/shelfmade/issues",
"support": "COMMUNITY",
"category": "Pipeline",
}
########################################################################################
# Imports
########################################################################################
import bpy # nopep8
# Import all modules to jump-start classes' 'bpy_register' decorators
from . import ( # nopep8
catalogue,
draw,
ops,
panels,
shelf,
preferences,
)
########################################################################################
# Register functions
########################################################################################
def register():
"""
Main registration.
"""
# Classes registration
catalogue.Catalogue.bpy_register()
# Initialize shelves
prefs = preferences.Preferences.this()
prefs.initialize_shelves()
# Remove nonexistent shelves & scripts
prefs.clean()
# Add shelf menu to text editor
bpy.types.TEXT_HT_header.append(draw.text_editor_shelf_menu)
def unregister():
"""
De-registration.
"""
# Remove text editor draw function
bpy.types.TEXT_HT_header.remove(draw.text_editor_shelf_menu)
# Classes un-registration
catalogue.Catalogue.bpy_deregister()