Blender-AC3D icon indicating copy to clipboard operation
Blender-AC3D copied to clipboard

AttributeError: 'NoneType' object has no attribute 'filepath'

Open onox opened this issue 9 years ago • 3 comments

@NikolaiVChr When trying to export to an .ac file, I get the following exception:

Traceback (most recent call last):
    File "/home/onox/.config/blender/2.72/scripts/addons/io_scene_ac3d/__init__.py", line 271, in execute
        export_ac3d.ExportAC3D(self, context, **keywords)
    File "/home/onox/.config/blender/2.72/scripts/addons/io_scene_ac3d/export_ac3d.py", line 119, in __init__
        self.world.parse(self.ac_mats)
    File "/home/onox/.config/blender/2.72/scripts/addons/io_scene_ac3d/AC3D.py", line 70, in parse
        child.parse(ac_mats, str_pre + '')
    File "/home/onox/.config/blender/2.72/scripts/addons/io_scene_ac3d/AC3D.py", line 67, in parse
        self._parse(ac_mats, str_pre)
    File "/home/onox/.config/blender/2.72/scripts/addons/io_scene_ac3d/AC3D.py", line 136, in _parse
        self._parseMesh(ac_mats)
    File "/home/onox/.config/blender/2.72/scripts/addons/io_scene_ac3d/AC3D.py", line 144, in _parseMesh
        self._parseMaterials(mesh, ac_mats)
    File "/home/onox/.config/blender/2.72/scripts/addons/io_scene_ac3d/AC3D.py", line 187, in _parseMaterials
        tex_name = bpy.path.basename(bl_im.filepath)
    AttributeError: 'NoneType' object has no attribute 'filepath'

    location: <unknown location>:-1

onox avatar Mar 09 '16 13:03 onox

This is a problem with exporting a texture.

Are you sure the texture is not packed inside Blender? (is not supported and will cause that error)

Otherwise can you give me link to the blend file, and its textures, so I can take a look?

NikolaiVChr avatar Mar 09 '16 19:03 NikolaiVChr

@onox are you there? Do you have an example file with that problem you could send me?

And were you using the older script from this site, or the current from https://github.com/NikolaiVChr/Blender-AC3D ?

Also notice this might happen, if you import a model, and some of the textures are not found (You can open the Blender console to see if that happens during import), and you then try to export it. It will then see that there is supposed to be a texture to export, but it can find no file attached.

NikolaiVChr avatar May 14 '16 06:05 NikolaiVChr

I don't have a file currently. I use your repository and it is usually fairly up-to-date. If it occurs again, I'll try to give you the file.

onox avatar May 16 '16 18:05 onox