forked from maybites/TextureSharing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
70 lines (57 loc) · 2.11 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
# 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/>.
bl_info = {
"name" : "TextureSharing",
"author" : "Martin Froehlich, Florian Bruggisser, Eduard Frigola",
"description" : "Streaming Spout / Syphon from Blender",
"blender" : (3, 0, 0),
"version" : (0, 0, 1),
"location" : "Properties > Camera > Camera data",
"warning" : "Experimental",
"category" : "Render",
"wiki_url" : "https://github.com/eduardfrigola/blender.texturesharing",
"tracker_url" : "https://github.com/eduardfrigola/blender.texturesharing/issues",
"support" : "COMMUNITY"
}
import platform
from . import (
pip_importer,
)
def register():
# First startup the pip importer
pip_importer.register()
# then add the required packages
if platform.system() == "Windows":
pip_importer.add_package(pip_importer.Package("SpoutGL", version="==0.0.4"))
if platform.system() == "Darwin":
pip_importer.add_package(pip_importer.Package("syphonpy", version="==0.0.2"))
# pip_importer.auto_install_packages()
# Check required modules availability
try:
pip_importer.check_modules()
from . import operators, ui
operators.register()
ui.register()
except ModuleNotFoundError:
print(
"Spout addon isn't available, install required module via Properties > Addons > Spout"
)
def unregister():
try:
operators.unregister()
ui.unregister()
except Exception:
pass
pip_importer.unregister()
if __name__ == "__main__":
register()