-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathenvironment.py
More file actions
210 lines (186 loc) · 5.71 KB
/
environment.py
File metadata and controls
210 lines (186 loc) · 5.71 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
import os
import psutil
from conda_git_deployment import utils
import environment_setup
def main():
environment = {}
# PATH
environment["PATH"] = [
os.path.abspath(
os.path.join(
__file__, "..", "applications", "djv-1.1.0-Windows-64", "bin"
)
),
"C:/Program Files (x86)/QuickTime/QTSystem/"
]
# PYTHONPATH
environment["PYTHONPATH"] = [
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"pyblish-maya",
"pyblish_maya",
"pythonpath"
),
os.path.join(os.environ["CONDA_GIT_REPOSITORY"], "pyblish-nukestudio"),
os.path.join(os.environ["CONDA_GIT_REPOSITORY"], "Tapp"),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"Tapp",
"environment",
"PYTHONPATH"
),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"], "studiolibrary", ".."
),
os.path.join(os.environ["CONDA_GIT_REPOSITORY"], "maya-capture"),
os.path.join(os.environ["CONDA_GIT_REPOSITORY"], "maya-capture-gui"),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"], "maya-alembic-export"
),
os.path.join(os.environ["CONDA_GIT_REPOSITORY"], "ftrack-hooks"),
os.path.join(os.environ["CONDA_GIT_REPOSITORY"], "filelink"),
os.path.join(os.environ["CONDA_GIT_REPOSITORY"], "pyblish-bumpybox"),
os.path.join(os.path.dirname(__file__), "environment", "PYTHONPATH"),
]
# LUCIDITY_TEMPLATE_PATH
environment["LUCIDITY_TEMPLATE_PATH"] = [
os.path.join(
os.path.dirname(__file__), "environment", "LUCIDITY_TEMPLATE_PATH"
),
]
# HIERO_PLUGIN_PATH
environment["HIERO_PLUGIN_PATH"] = [
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"pyblish-nukestudio",
"pyblish_nukestudio",
"hiero_plugin_path",
),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"pyblish-grill-environment",
"environment",
"HIERO_PLUGIN_PATH"
),
os.path.join(
os.path.dirname(__file__), "environment", "HIERO_PLUGIN_PATH"
),
]
# NUKE_PATH
environment["NUKE_PATH"] = [
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"pyblish-nuke",
"pyblish_nuke",
"nuke_path"
),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"pyblish-bumpybox",
"pyblish_bumpybox",
"environment_variables",
"nuke_path"
),
os.path.join(
os.path.dirname(__file__), "environment", "NUKE_PATH"
),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"Cryptomatte",
"nuke"
),
]
# MAYA_PLUG_IN_PATH
environment["MAYA_PLUG_IN_PATH"] = [
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"Tapp",
"environment",
"MAYA_PLUG_IN_PATH"
),
os.path.join(
os.path.dirname(__file__), "environment", "MAYA_PLUG_IN_PATH"
)
]
# XBMLANGPATH
environment["XBMLANGPATH"] = [
os.path.join(os.path.dirname(__file__), "environment", "XBMLANGPATH")
]
# MAYA_MODULE_PATH
environment["MAYA_MODULE_PATH"] = [
os.path.join(os.environ["CONDA_GIT_REPOSITORY"], "cvshapeinverter"),
]
# ARNOLD_PLUGIN_PATH
environment["ARNOLD_PLUGIN_PATH"] = [
os.path.abspath(
os.path.join(
__file__,
"..",
"applications",
"alShaders-win-2.0.0b2-ai5.0.1.0",
"bin"
)
)
]
# FTRACK_CONNECT_PLUGIN_PATH
environment["FTRACK_CONNECT_PLUGIN_PATH"] = [
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"], "ftrack-hooks", "djv_plugin"
),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"ftrack-hooks",
"create_structure"
),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"ftrack-hooks",
"batch_tasks"
),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"ftrack-hooks",
"running_jobs"
),
os.path.join(
os.environ["CONDA_GIT_REPOSITORY"],
"ftrack-hooks",
"status_assign"
),
os.path.join(
os.path.dirname(__file__),
"environment",
"FTRACK_CONNECT_PLUGIN_PATH"
)
]
# FTRACK_EVENT_PLUGIN_PATH
environment["FTRACK_EVENT_PLUGIN_PATH"] = [
os.path.join(
os.path.dirname(__file__),
"environment",
"FTRACK_EVENT_PLUGIN_PATH"
)
]
# PYBLISH_HOTKEY
environment["PYBLISH_HOTKEY"] = ["Ctrl+Alt+P"]
# PYBLISH_QML_MODAL
environment["PYBLISH_QML_MODAL"] = ["True"]
# PYBLISH_ALLOW_DUPLICATE_PLUGIN_NAMES
environment["PYBLISH_ALLOW_DUPLICATE_PLUGIN_NAMES"] = ["True"]
# solidangle_LICENSE
environment["solidangle_LICENSE"] = ["5053@BUMPYBOXSERVER"]
# foundry_LICENSE
environment["foundry_LICENSE"] = ["4101@172.17.0.2"]
# Kill existing ftrack_connects
for proc in psutil.process_iter():
try:
if "ftrack_connect" in proc.cmdline():
proc.kill()
except psutil.AccessDenied:
# Some process does not allow you to get "cmdline()"
pass
utils.write_environment(environment)
if __name__ == "__main__":
environment_setup.install_djv()
environment_setup.install_alshaders()
main()