-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy path__init__.py
136 lines (118 loc) · 6.06 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
####################################################################################################
# Copyright (c) 2016 - 2024, EPFL / Blue Brain Project
# Author(s): Marwan Abdellah <[email protected]>
#
# Credits: Ahmedt Bilgili
# Juan Hernando
# Stefan Eilemman
# Henry Markram
# Felix Shurmann
#
# This file is part of NeuroMorphoVis <https://github.com/BlueBrain/NeuroMorphoVis>
#
# 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, version 3 of the License.
#
# This Blender-based tool 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, see <http://www.gnu.org/licenses/>.
####################################################################################################
# System imports
import sys
import os
__author__ = "Marwan Abdellah"
__copyright__ = "Copyright (c) 2016 - 2024, Blue Brain Project / EPFL"
__credits__ = ["Ahmet Bilgili", "Juan Hernando", "Stefan Eilemann", "Nadir Roman"]
__maintainer__ = "Marwan Abdellah"
__email__ = "[email protected]"
__status__ = "Production"
####################################################################################################
# Add-on information
####################################################################################################
bl_info = {
# The name of your add-on. This is shown in the add-on tab in Blender's user preferences
"name": "NeuroMorphoVis",
# The author of this add-on
"author": "Marwan Abdellah",
# A tuple, containing the add-on version
"version": (1, 9, 0),
# The earliest Blender version this add-on will work with. If you're not sure what versions of
# Blender this add-on is compatible with, use the version of Blender you're developing
# the add-on with.
"blender": (3, 0, 0),
# This is where users should look for this add-on.
# "location": "View 3D > Edit Mode > Tool Shelf",
# Description
"description": "Morphology reconstruction, analysis and visualization to mesh reconstruction. "
"The Add-on was developed by the Blue Brain Project (BBP) at the Ecole "
"Polytechnique Federale de Lausanne (EPFL).",
# Add-on category; shown on the left side of Blender's add-on list to make filtering simpler.
# This must be one of the categories as listed in Blender's add-on tab; if it's not, it will
# create a new category for your add-on (which may be good or bad.)
# Don't create new categories to make your add-on stand out.
"category": "3D View",
# This support can be either 'OFFICIAL', 'COMMUNITY', or 'TESTING'. 'OFFICIAL' should only be
# used if this add-on is included with Blender.
# (If you're not sure, don't use 'OFFICIAL'.) 'COMMUNITY' and 'TESTING' are both fine to use.
# Note that 'TESTING' add-ons aren't shown by default in Blender's add-on list.
'support': 'COMMUNITY',
# Optional: specifies the wiki URL for an add-on.
# This will appear in this add-on listing as "Documentation".
'wiki_url': 'https://github.com/BlueBrain/NeuroMorphoVis',
# Bug tracker: specifies the bug-tracker URL for an add-on.
'tracker_url': 'https://github.com/BlueBrain/NeuroMorphoVis/issues?utf8=%E2%9C%93&q=',
}
# Append the modules path to the system paths to be able to load the internal python modules
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
####################################################################################################
# @register
####################################################################################################
def register():
"""Register the different modules of the interface"""
# Import the modules
import nmv.interface
import nmv.utilities
sys.setrecursionlimit(5000)
nmv.logger.header('Loading NeuroMorphoVis')
nmv.logger.info('Version %s' % str(nmv.utilities.get_nmv_version()))
nmv.logger.info('Copyrights (c) Blue Brain Project (BBP) / (EPFL) - 2024')
nmv.logger.info('Principal Author: Marwan Abdellah')
# Register panels
nmv.interface.ui.register_common_operators()
nmv.interface.ui.io.register_panel()
nmv.interface.ui.analysis.register_panel()
nmv.interface.ui.edit.register_panel()
nmv.interface.ui.soma.register_panel()
nmv.interface.ui.morphology.register_panel()
nmv.interface.ui.synaptics.register_panel()
nmv.interface.ui.mesh.register_panel()
nmv.interface.ui.about.register_panel()
nmv.logger.info_done('NeuroMorphoVis Loaded! Enjoy')
####################################################################################################
# @unregister
####################################################################################################
def unregister():
"""Unregister the different modules of the interface"""
# Import the modules
import nmv.interface
nmv.logger.header('Unloading NeuroMorphoVis')
# Un-register panels
nmv.interface.ui.unregister_common_operators()
nmv.interface.ui.io.unregister_panel()
nmv.interface.ui.analysis.unregister_panel()
nmv.interface.ui.edit.unregister_panel()
nmv.interface.ui.soma.unregister_panel()
nmv.interface.ui.morphology.registration.unregister_panel()
nmv.interface.ui.synaptics.unregister_panel()
nmv.interface.ui.mesh.unregister_panel()
nmv.interface.ui.about.unregister_panel()
nmv.logger.info_done('NeuroMorphoVis Unloaded!')
####################################################################################################
# __main__
####################################################################################################
if __name__ == "__main__":
# Register the add-on, ENTRY POINT -> NeuroMorphoVis
register()