Convert Blender-Purge
to a more generic Blender-Crawl
Tool
#42
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user