-
Notifications
You must be signed in to change notification settings - Fork 11
/
project_env.sh
executable file
·216 lines (165 loc) · 7.17 KB
/
project_env.sh
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
211
212
213
214
215
#!/bin/bash
# project_evn.sh
# Exports all project environment variables and creates missing directories
# This script will need to be edited for each project.
#
# Place this script and other tools inside the ${PROJECT_TOOLS} directory defined below.
#
# @author: Brian Kingery
###############################################################################
# Project specific environment variables
###############################################################################
# Root directory for the project (eg: /groups/owned)
# This directory should be created manually.
# If JOB is not already set, then set it with a hardcoded default.
# Also, set PROJECT_NAME based on JOB.
if [ -z "$JOB" ]
then
# The name of the project (eg: owned)
export PROJECT_NAME=papa
export JOB=/users/groups/${PROJECT_NAME}
else
export PROJECT_NAME=`basename $JOB`
fi
# Set PS1 to a sane default if it doesn't already exist
if [ -z "$PS1" ]
then
PS1="[\u@\h \W]\$ "; # Customize terminal prompt
fi
# Tools/scripts directory. This project_env.sh script should be placed here.
# along with the other tools and scripts.
# Yes, its a chicken egg problem...
export PROJECT_TOOLS=${JOB}/papa-tools
export PATH=${PROJECT_TOOLS}/standalone_scripts:$PATH
# Production directory
export PRODUCTION_DIR=${JOB}/production
# User directory for checkout files, testing, ect.
export USER_DIR=${JOB}/users/${USER}
# Directory for dailies
export DAILIES_DIR=${JOB}/dailies
# Root directory for assets
export ASSETS_DIR=${PRODUCTION_DIR}/assets
# Root directory for sequences
export SHOTS_DIR=${PRODUCTION_DIR}/shots
# Root directory for previsualization sequences
export PREVIS_DIR=${PRODUCTION_DIR}/previs
# Directory for otls
export OTLS_DIR=${PRODUCTION_DIR}/otls
# Directory for settings
export HTOOLS_DIR=${PROJECT_TOOLS}/houdini-tools
# Append to python path so batch scripts can access our modules
export PYTHONPATH=$PYTHONPATH:/usr/autodesk/maya2014-x64/lib/python2.7/site-packages:/usr/lib64/python2.6/site-packages:/usr/lib64/python2.7/site-packages:${PROJECT_TOOLS}:${PROJECT_TOOLS}/asset_manager:${PROJECT_TOOLS}/houdini-tools/python2.6libs:${PROJECT_TOOLS}/houdini-tools/python2.6libs/ui_tools:${PROJECT_TOOLS}/nuke-tools/python:${PYTHONPATH}:${PROJECT_TOOLS}/asset_manager/DAOs
# Issue submission website
export ISSUE_URL="https://docs.google.com/forms/d/1VdQgp3o4MLKPVziHR01qYL7NYfiiWXN2VvyGsmpTe1M/viewform"
# Function to build directory structure
buildProjectDirs()
{
# Create Dailies directory
if [ ! -d "$DAILIES_DIR" ]; then
echo "making dailies dir"
mkdir -p "$DAILIES_DIR"
mkdir -p "$DAILIES_DIR"/tmp
mkdir -p "$DAILIES_DIR"/renders
fi
# Create Production directory
if [ ! -d "$PRODUCTION_DIR" ]; then
echo "making production dir"
mkdir -p "$PRODUCTION_DIR"
fi
# Create Root directory for assets
if [ ! -d "$ASSETS_DIR" ]; then
echo "making assets dir"
mkdir -p "$ASSETS_DIR"
fi
# Create Root directory for animation
if [ ! -d "$SHOTS_DIR" ]; then
echo "making shots dir"
mkdir -p "$SHOTS_DIR"
fi
# Create Root directory for previs animation
if [ ! -d "$PREVIS_DIR" ]; then
echo "making previs dir"
mkdir -p "$PREVIS_DIR"
fi
# Create Directory for otls
if [ ! -d "$OTLS_DIR" ]; then
echo "making otls dir"
mkdir -p "$OTLS_DIR"
fi
# Create User directory for checkout files, testing, ect.
if [ ! -d "$USER_DIR" ]; then
echo "making user dir"
mkdir -p "$USER_DIR"
mkdir -p "$USER_DIR"/checkout
chmod 774 -R "$USER_DIR"
fi
# Create tmp directory for ifds
if [ ! -d "$JOB"/tmp/ifds ]; then
echo "making tmp dir"
mkdir -p "$JOB"/tmp/ifds
fi
if [ ! -d ~/houdini13.0/dso ]; then
mkdir -p ~/houdini13.0/dso
fi
# Install Studio Library
if [ ! -d ~/maya/scripts/studioLibrary ]; then
mkdir -p ~/maya/scripts/studioLibrary
cp -r ${PROJECT_TOOLS}/maya-tools/shelf/scripts/studioLibrary/* ~/maya/scripts/studioLibrary
fi
# Create temp folder for Studio Library
if [ ! -d /usr/tmp/studioLibrary ]; then
mkdir -p -m 777 /usr/tmp/studioLibrary
fi
cp -u ${PROJECT_TOOLS}/otl_templates/*.otl ${OTLS_DIR}
cp -u ${PROJECT_TOOLS}/houdini_dso/*.so ~/houdini13.0/dso
}
# Uncomment to build the project directories
buildProjectDirs
###############################################################################
# RenderMan specific environment
###############################################################################
export RMANTREE=/opt/pixar/RenderManProServer
# Add some extra directories to PATH in case they weren't there before
export PATH=${RMANTREE}/bin:${PATH}
###############################################################################
# Houdini specific environment
###############################################################################
# The Python that ships with RHEL5 is too old.
export HOUDINI_USE_HFS_PYTHON=1
# HSITE doesn't currently point to anything we can use right now...
export HSITE=/groups
# Include GLOBAL_DIR in Houdini path, so we will pick up project settings and assets.
HOUDINI_PATH=${HOME}/houdini${HOUDINI_MAJOR_RELEASE}.${HOUDINI_MINOR_RELEASE}
HOUDINI_PATH=${HOUDINI_PATH}:${HSITE}/byu-anim/houdini${HOUDINI_MAJOR_RELEASE}.${HOUDINI_MINOR_RELEASE}
HOUDINI_PATH=${HOUDINI_PATH}:${HTOOLS_DIR}:${HFS}/houdini
export HOUDINI_PATH
# Add our custom python scripts
export HOUDINI_PYTHON_LIB=${PYTHONPATH}:${HOUDINI_PYTHON_LIB}
# Add our custom shelf tools
# export HOUDINI_TOOLBAR_PATH=${PROJECT_TOOLS}:${HOUDINI_PATH}
# Add production and checkout otls to the OTL PATH.
export HOUDINI_OTL_PATH=${USER_DIR}:${PRODUCTION_DIR}:${HOUDINI_PATH}
###############################################################################
# Maya specific environment
###############################################################################
# Add our custom python scripts
export MAYA_TOOLS_DIR=${PROJECT_TOOLS}/maya-tools
export MAYA_PLUG_IN_PATH=$MAYA_PLUG_IN_PATH:${MAYA_TOOLS_DIR}/plugins/plugins
export MAYA_SHELF_DIR=${MAYA_TOOLS_DIR}/shelf
export MAYA_SCRIPT_PATH=${MAYA_SCRIPT_PATH}:${PYTHONPATH}:${MAYA_SHELF_DIR}:${MAYA_TOOLS_DIR}/plugins/scripts
###############################################################################
# Nuke specific environment
###############################################################################
export NUKE_LOCATION=/usr/local/Nuke8.0v3
export NUKE_TOOLS_DIR=${PROJECT_TOOLS}/nuke-tools
#export NUKE_TOOLS_DIR=${NUKE_TOOLS_DIR}/python:${NUKE_TOOLS_DIR}
#export NUKE_PATH=${HOME}/.nuke:${NUKE_TOOLS_DIR}:${NUKE_LOCATION}/plugins/user:${NUKE_LOCATION}/plugins/icons:${NUKE_LOCATION}/plugins
export NUKE_PATH=${NUKE_TOOLS_DIR}
###############################################################################
# Mari specific environment
###############################################################################
export MARI_SCRIPT_PATH=${PROJECT_TOOLS}/mari-tools/
export MARI_DEFAULT_GEOMETRY_PATH=${ASSETS_DIR} # Easier for loading in geo for an asset.
###############################################################################
# BEGIN AWESOMENESS!!!
###############################################################################