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 c391a00145 - Show all commits

View File

@ -200,11 +200,11 @@ def input_filepath(question: str) -> Path:
return path
def setup_config() -> None:
def setup_config(find_blender_exec) -> None:
config_path = get_config_path()

I don't think this program should have any config file at all.

Unless the command line tool is very complex (which this one is not), then the user should always have a fresh start each time the command line tool is run.

I'll elaborate further in an other comment.

I don't think this program should have any config file at all. Unless the command line tool is very complex (which this one is not), then the user should always have a fresh start each time the command line tool is run. I'll elaborate further in an other comment.

We handled this together 9e9c60fda3 issue resolved!

We handled this together https://projects.blender.org/studio/blender-studio-pipeline/commit/9e9c60fda3035acebb0991bad4c24b9643b29b36 issue resolved!
config_path.parent.mkdir(parents=True, exist_ok=True)
default_blender_path = find_default_blender()
if default_blender_path:
if (not(find_blender_exec) and default_blender_path):
blender_path = default_blender_path
else:
blender_path = input_filepath("# Path to Blender binary: ")
@ -247,7 +247,7 @@ def run_blender_crawl(args: argparse.Namespace) -> int:
yes = args.yes
# Check config file.
if not config_path.exists():
if not config_path.exists() or find_blender_exec:
print("# Seems like you are starting blender-crawl for the first time!")
print("# Some things needs to be configured")
setup_config(find_blender_exec)