@@ -11,16 +11,26 @@ Requirements
11
11
12
12
* [FBX SDK C# Bindings](https://github.com/Unity-Technologies/FbxSharp)
13
13
14
- Command-line Installing Maya2017 Integration
14
+ Installing Maya Integration
15
15
--------------------------------------------
16
16
17
- You can install the package and integrations from the command-line using the following script:
17
+ The easy way to install the Maya integration is with the
18
+ FbxExporters -> Install Maya Integration
19
+ menu option in Unity.
20
+
21
+ It uses the most recent version of Maya it can find. Set your MAYA_LOCATION
22
+ environment before running Unity if you want to specify a particular version of Maya.
23
+
24
+
25
+ Alternately, you can install the package and integrations from the command-line
26
+ using the following script:
27
+
18
28
19
29
MacOS:
20
30
21
31
# Configure where Unity is installed
22
- if [ ! -f "${UNITY3D_PATH}" ]; then
23
- UNITY3D_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity "
32
+ if [ ! -d "${UNITY3D_PATH}" ]; then
33
+ UNITY3D_PATH="/Applications/Unity/Unity.app"
24
34
fi
25
35
26
36
# Configure which Unity project to install package
@@ -33,23 +43,24 @@ if [ ! -f "${PACKAGE_PATH}" ]; then
33
43
PACKAGE_PATH=`ls -t ${PROJECT_PATH}/FbxExporters_*.unitypackage | head -1`
34
44
fi
35
45
36
- if [ ! -f "${UNITY3D_PATH}" ]; then
46
+ # Configuring Maya2017 to auto-load integration
47
+ if [ ! -d "${MAYA_LOCATION}" ] ; then
48
+ MAYA_LOCATION=/Applications/Autodesk/maya2017/Maya.app
49
+ fi
50
+ export MAYA_LOCATION
51
+
52
+ if [ ! -d "${UNITY3D_PATH}" ]; then
37
53
echo "Unity is not installed"
54
+ elif [ ! -d "${MAYA_LOCATION}" ] ; then
55
+ echo "Maya is not installed"
38
56
else
39
57
# Install FbxExporters package
40
- "${UNITY3D_PATH}" -projectPath "${PROJECT_PATH}" -importPackage ${PACKAGE_PATH} -quit
41
-
42
- # Install Maya2017 Integration
43
- "${UNITY3D_PATH}" -batchMode -projectPath "${PROJECT_PATH}" -executeMethod FbxExporters.Integrations.InstallMaya2017 -quit
58
+ "${UNITY3D_PATH}/Contents/MacOS/Unity" -projectPath "${PROJECT_PATH}" -importPackage ${PACKAGE_PATH} -quit
44
59
45
- # Configuring Maya2017 to auto-load integration
46
- MAYA_PATH=/Applications/Autodesk/maya2017/Maya.app/ Contents/bin/maya
60
+ # Install Maya Integration. Requires MAYA_LOCATION.
61
+ "${UNITY3D_PATH}/ Contents/MacOS/Unity" -batchMode -projectPath "${PROJECT_PATH}" -executeMethod FbxExporters.Integrations.InstallMaya -quit
47
62
48
- if [ ! -f "${MAYA_PATH}" ]; then
49
- echo "Maya2017 not installed"
50
- else
51
- # To configure without user interface change the last argument to 1 instead of 0
52
- "${MAYA_PATH}" -command "configureUnityOneClick \"${PROJECT_PATH}\" \"${UNITY3D_PATH}\" 0; scriptJob -idleEvent quit;"
53
- fi
63
+ # To configure without user interface change the last argument to 1 instead of 0
64
+ "${MAYA_LOCATION}/Contents/MacOS/Maya" -command "configureUnityOneClick \"${PROJECT_PATH}\" \"${UNITY3D_PATH}\" 0; scriptJob -idleEvent quit;"
54
65
fi
55
66
0 commit comments