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
Showing only changes of commit 032da6d248 - Show all commits

View File

@ -59,7 +59,7 @@ parser.add_argument(
parser.add_argument(
"-f",
"--filter",
help="Provide a string to filter the found .blend files",
help="Provide a string to filter the found .blend files",
)
parser.add_argument(
@ -144,7 +144,7 @@ def main() -> int:
import sys
"""Crawl blender files in a directory and run a provided scripts"""
# Parse arguments.
args = parser.parse_args()
args = parser.parse_args()
purge_path = get_purge_path(args.purge)
recursive = args.recursive
exec = args.exec
@ -158,13 +158,13 @@ def main() -> int:
script_name = check_file_exists(
script,
"No --script was not provided as argument, printed found .blend files, exiting program.",
)
)
scripts.append(script_name)
# Purge is optional so it can be none
if purge_path is not None:
scripts.append(purge_path)
if not exec:
blender_exec = find_executable()
else: