nitro-engine/examples/loading/filesystem_animated_model/assets.sh
Antonio Niño Díaz d52a92812e examples: Use BLOCKSDS environment variables to find tools
Only use the hardcoded paths if the variable isn't set to anything.
2025-03-24 21:18:00 +00:00

26 lines
552 B
Bash

#!/bin/sh
NITRO_ENGINE=../../..
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
MD5_TO_DSMA=$TOOLS/md5_to_dsma/md5_to_dsma.py
BLOCKSDS="${BLOCKSDS:-/opt/blocksds/core/}"
GRIT=$BLOCKSDS/tools/grit/grit
rm -rf nitrofiles
mkdir -p nitrofiles
python3 $MD5_TO_DSMA \
--model $ASSETS/robot/Robot.md5mesh \
--name robot \
--output nitrofiles \
--texture 256 256 \
--anim $ASSETS/robot/Wave.md5anim \
--skip-frames 1 \
--blender-fix
$GRIT \
graphics/texture.png \
-ftb -fh! -W1 \
-onitrofiles/texture