Convert Blender-Purge to a more generic Blender-Crawl Tool #42

Merged
Nick Alberelli merged 34 commits from feature/blender-crawl into main 2023-05-17 15:38:47 +02:00
2 changed files with 20 additions and 0 deletions
Showing only changes of commit 5f37ff1475 - Show all commits

View File

@ -0,0 +1,16 @@
#!/bin/bash
directory=$1
echo "Looking for .blend files in follwing directory: '$directory'"
for file in $directory/*.blend; do
if test -f "$file"; then
echo "FOUND FILE!" $(basename ${file})
blender $file --background --python test-py-file.py
fi
done
echo "Blener-Crawl is done!"
# Usage!
# pass directory containing .blend files like example below:
# ./run-blender-crawl.sh /path/to/blends/

View File

@ -0,0 +1,4 @@
import bpy
bpy.ops.object.add(type="EMPTY")
bpy.ops.wm.save_mainfile()
print("Example Py script execution completed!")