blender2ogre icon indicating copy to clipboard operation
blender2ogre copied to clipboard

Exporting material with image texture fail when convertion not select

Open AdrienR opened this issue 3 years ago • 1 comments

Hi I faced an issue when exporting a model textured with an image (from uv maping in blender).

Blender version: 2.83.5 blender2ogre version: 0.8.3

When exporting with option "Convert images" to None, i got the output below. I had to manualy select an option. A better error message would help a lot when facing this error.

Traceback (most recent call last):
  File "/usr/share/blender/scripts/addons/io_ogre/ui/export.py", line 201, in execute
    scene.dot_scene(target_path, target_file_name_no_ext)
  File "/usr/share/blender/scripts/addons/io_ogre/ogre/scene.py", line 189, in dot_scene
    dot_materials(materials, path, separate_files=config.get('SEPARATE_MATERIALS'), prefix=prefix)
  File "/usr/share/blender/scripts/addons/io_ogre/ogre/material.py", line 75, in dot_materials
    generator.copy_textures()
  File "/usr/share/blender/scripts/addons/io_ogre/ogre/material.py", line 301, in copy_textures
    self.copy_texture(image)
  File "/usr/share/blender/scripts/addons/io_ogre/ogre/material.py", line 335, in copy_texture
    shutil.copy2(image_filepath, target_filepath)
  File "/usr/lib/python3.9/shutil.py", line 435, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.9/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
IsADirectoryError: [Errno 21] Is a directory: '.'

location: <unknown location>:-1

This is the blender console. I got no error message from blender2ogre.log and OgreXMLConverter.log

AdrienR avatar Jun 12 '22 09:06 AdrienR

Im using blender 2.82 and latest blender2ogre and exporting images works fine, also Im using python --version Python 3.8.10

vido89 avatar Jun 12 '22 13:06 vido89