# I assume that tex.write saves the image to the temp path Tex.write(str(temp_file_path)) # convert path to string #temp_file_path = os.path.join(temp_dir, tex_name) Name="/usr/batfinger/Desktop/batman.png",įilepath="/some/path/to/sketchupfile.skp" Python 3 Quick Tip: The easy way to deal with file paths on Windows, Mac and Linuxįive Most Useful Pathlib Operations import bpy Please check out the following medium links, especially the first as it goes a long way to explaining the issue & the process to fix The code snippet shown appears to be written exclusively for MS Windows OS which uses backslashes as path separator. It’s not a deal-breaker given that it can be worked around without changing the code, but it would be nice to have it robustly solved.įeel this is bordering on off-topic, in lieu of a further long comment will add a fix to code snippet in question to convert to pathlib, always happy to spruik for pathlib. I am sure there must be a straightforward way of solving this in the code, but I only have the most basic idea of how Python works, so I would appreciate a hint. Temp_file_path = os.path.join(temp_dir, tex_name) ![]() The larger context of the offending code ( _init_.py around line 433) is this: if tex: ![]() ![]() Self.write_materials(self.skp_model.materials)įile "/Users/palazzo/Library/Application Support/Blender/2.93/scripts/addons/sketchup_importer/_init_.py", line 433, in write_materialsįileNotFoundError: No such file or directory: '/var/folders/nr/50wh3xf90rb5lqnrf0vpwtz00000gn/T/path/to/my/sketchup-file' Return SceneImporter().set_filename(keywords).load(įile "/Users/palazzo/Library/Application Support/Blender/2.93/scripts/addons/sketchup_importer/_init_.py", line 236, in load Now, when running the importer on a path that has spaces or dashes, I get the following error on any file I try to load: Python: Traceback (most recent call last):įile "/Users/palazzo/Library/Application Support/Blender/2.93/scripts/addons/sketchup_importer/_init_.py", line 982, in execute I am using Blender 2.93.4 on MacOS 10.15 and followed the build instructions for the Sketchup Importer on Arindam Mondal's version 0.23.īecause the Cycles renderer is not available on my graphics card, I was getting errors when the addon attempted to load geometries and materials, so I manually edited /sketchup_importer/_init_.py to change all references from "CYCLES" to "BLENDER_EEVEE".
0 Comments
Leave a Reply. |