chore(config): add spike gitignore rules and Blender wrapper
Add .gitignore entries for spike Godot caches, import artifacts, and vendor asset downloads. Add tooling/blender wrapper that resolves flatpak/native Blender installs and auto-converts relative paths to absolute for flatpak sandbox compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,14 @@ renderer/**/*.import
|
||||
renderer/**/*.uid
|
||||
renderer/output/*.png
|
||||
|
||||
# Spikes (Godot cache + import artifacts)
|
||||
spikes/**/.godot/
|
||||
spikes/**/*.import
|
||||
spikes/**/*.uid
|
||||
|
||||
# Asset downloads (vendor archives, not game content)
|
||||
docs/assets/downloads/
|
||||
|
||||
# Database (shared across worktrees at ../settledreach.db, not tracked)
|
||||
db/commonwealth.db*
|
||||
|
||||
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# Blender wrapper — resolves flatpak/native/brew installs to a single entry point.
|
||||
# All project scripts should call this instead of 'blender' directly.
|
||||
#
|
||||
# Resolves relative paths in --python and -- args to absolute paths so flatpak
|
||||
# sandboxing doesn't break file resolution.
|
||||
#
|
||||
# Usage:
|
||||
# tooling/blender --background --python script.py -- input.glb output.glb
|
||||
|
||||
# Convert relative paths to absolute
|
||||
args=()
|
||||
for arg in "$@"; do
|
||||
if [[ -e "$arg" ]]; then
|
||||
args+=("$(realpath "$arg")")
|
||||
else
|
||||
args+=("$arg")
|
||||
fi
|
||||
done
|
||||
|
||||
if command -v blender &>/dev/null; then
|
||||
exec blender "${args[@]}"
|
||||
elif flatpak info org.blender.Blender &>/dev/null 2>&1; then
|
||||
exec flatpak run org.blender.Blender "${args[@]}"
|
||||
else
|
||||
echo "ERROR: Blender not found (checked PATH and flatpak)" >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user