From 472593afd828abd3e129be62e2554d7ea79300d7 Mon Sep 17 00:00:00 2001 From: Petter Amland Date: Fri, 4 Oct 2024 18:19:47 +0200 Subject: [PATCH] added better error message when ursina can't find blender, by including and example of how to provide a custom path. --- ursina/mesh_importer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ursina/mesh_importer.py b/ursina/mesh_importer.py index a2a0a2a8..dee001ce 100644 --- a/ursina/mesh_importer.py +++ b/ursina/mesh_importer.py @@ -188,7 +188,7 @@ def load_blender_scene(name, path=Func(getattr, application, 'asset_folder'), re def get_blender(blend_file): # try to get a matching blender version in case we have multiple blender version installed if not application.blender_paths: - print_warning('error: trying to load .blend file, but no blender installation was found. blender_paths:', application.blender_paths) + print_warning(f"Error: Trying to load .blend file, but no blender installation was found. blender_paths: {application.blender_paths}. If Blender is not installed, install it. If Blender is installed, but not found, make sure to install it to the default install location. If it's still not found, you can provide a custom path like this: application.blender_paths['default'] = Path('C:\Program Files\...')") return None if len(application.blender_paths) == 1: @@ -213,8 +213,8 @@ def blend_to_obj(blend_file:Path, out_folder=Func(getattr, application, 'compres if callable(out_folder): out_folder = out_folder() - if not application.compressed_models_folder.exists(): - application.compressed_models_folder.mkdir() + if not out_folder.exists(): + out_folder.mkdir() export_script_path = application.internal_scripts_folder / '_blend_export.py' exported = []