Blender Crawl: Improvements based on User Feedback #53

Merged
Nick Alberelli merged 11 commits from fix/blender-crawl-improvements into main 2023-05-22 16:50:42 +02:00
Showing only changes of commit b619b23110 - Show all commits

View File

@ -34,7 +34,7 @@ import uuid
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument( parser.add_argument(
"path", "path",
help="Path to a file(s) or folder(s) on which to perform crawl", help="Path to a file(s) or folder(s) on which to perform crawl.",
nargs='+' nargs='+'
) )
@ -48,7 +48,7 @@ parser.add_argument(
parser.add_argument( parser.add_argument(
"-s", "-s",
"--script", "--script",
help="Path to blender python script(s) to execute inside .blend files during crawl. Execution is skipped if no script is provided", help="Path to blender python script(s) to execute inside .blend files during crawl. Execution is skipped if no script is provided.",
nargs='+', nargs='+',
) )
parser.add_argument( parser.add_argument(
@ -60,14 +60,14 @@ parser.add_argument(
parser.add_argument( parser.add_argument(
"-r", "-r",
"--recursive", "--recursive",
help="If -r is provided in combination with a folder path will perform recursive crawl", help="If -r is provided in combination with a folder path will perform recursive crawl.",
action="store_true", action="store_true",
) )
parser.add_argument( parser.add_argument(
"-f", "-f",
"--filter", "--filter",
help="Provide a string to filter the found .blend files", help="Provide a string to filter the found .blend files.",
) )
parser.add_argument( parser.add_argument(
@ -80,7 +80,7 @@ parser.add_argument(
parser.add_argument( parser.add_argument(
"-p", "-p",
"--purge", "--purge",
help="Run 'built-in function to purge data-blocks from all .blend files found in crawl.'.", help="Run 'built-in function to purge data-blocks from all .blend files found in crawl, and saves them.",
action="store_true", action="store_true",
) )
@ -252,7 +252,6 @@ def main() -> int:
) )
sys.exit(0) sys.exit(0)
# crawl each file two times.
for blend_file in files: for blend_file in files:
for script in scripts: for script in scripts:
cmd_list = ( cmd_list = (