-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·97 lines (81 loc) · 2.69 KB
/
build.sh
File metadata and controls
executable file
·97 lines (81 loc) · 2.69 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
#!/bin/bash
# FBX Auto Rigger Build Script for macOS (M1)
set -e
echo "🔧 Building FBX Auto Rigger for macOS (M1)..."
# Check if FBX SDK is installed
FBX_SDK_PATHS=(
"/Applications/Autodesk/FBX SDK/2020.3.7"
"/Applications/Autodesk/FBX SDK/2020.2.1"
"/Applications/Autodesk/FBX SDK/2019.5"
"/usr/local/fbx"
"/opt/fbx"
"$HOME/fbx"
)
FBX_SDK_ROOT=""
for path in "${FBX_SDK_PATHS[@]}"; do
if [ -d "$path" ]; then
FBX_SDK_ROOT="$path"
echo "✅ Found FBX SDK at: $FBX_SDK_ROOT"
break
fi
done
if [ -z "$FBX_SDK_ROOT" ]; then
echo "❌ FBX SDK not found. Please install FBX SDK from:"
echo " https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2020-3-4"
echo ""
echo " Or set FBX_SDK_ROOT environment variable:"
echo " export FBX_SDK_ROOT=/path/to/fbx/sdk"
exit 1
fi
# Create build directory
BUILD_DIR="build_macos"
if [ -d "$BUILD_DIR" ]; then
echo "🧹 Cleaning existing build directory..."
rm -rf "$BUILD_DIR"
fi
mkdir "$BUILD_DIR"
cd "$BUILD_DIR"
echo "🔨 Configuring CMake..."
# Configure with CMake
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DFBX_SDK_ROOT="$FBX_SDK_ROOT" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
echo "🏗️ Building..."
# Build the project
make -j$(sysctl -n hw.ncpu)
if [ $? -eq 0 ]; then
echo "✅ Build successful!"
echo ""
echo "📦 Executable location: $BUILD_DIR/FBXAutoRigger"
echo ""
echo "🚀 Usage examples:"
echo " ./FBXAutoRigger character.fbx rigged_character.fbx"
echo " ./FBXAutoRigger -v -r 10.0 character.fbx rigged_character.fbx"
echo " ./FBXAutoRigger --help"
echo ""
# Create templates directory if it doesn't exist
if [ ! -d "templates" ]; then
mkdir templates
echo "📁 Created templates directory. Place your Mixamo template FBX files here."
fi
# Create output directory
if [ ! -d "output" ]; then
mkdir output
echo "📁 Created output directory for rigged characters."
fi
echo "💡 To get started:"
echo " 1. Prepare a rigged character as template (from Mixamo, Blender, Maya, etc.)"
echo " 2. Place your unrigged character FBX file in this directory"
echo " 3. Run: ./FBXAutoRigger template_rigged.fbx your_character.fbx output/rigged_character.fbx"
echo ""
echo "📋 Example workflow:"
echo " # Download rigged character from Mixamo"
echo " # Use it as template for your character"
echo " ./FBXAutoRigger mixamo_character.fbx my_character.fbx output/my_rigged_character.fbx"
else
echo "❌ Build failed!"
exit 1
fi