ccxvii / asstools

3d Asset Tools
67 stars 22 forks source link

AttributeError: 'Mesh' object has no attribute 'show_double_sided' #8

Open 1sa1as opened 3 years ago

1sa1as commented 3 years ago

Hi! I'm trying to import a IQM model using iqm_import.py, but I'm getting an error saying:

AttributeError: 'Mesh' object has no attribute 'show_double_sided'

So, it imports the armature but not the mesh! I'm using Blender 2.83

error

Here is the full Blender Info Log:


bpy.ops.object.select_all(action='SELECT') bpy.ops.object.delete(use_global=False) Deleted 3 object(s) bpy.context.space_data.recent_folders_active = 0 bpy.ops.object.add(type='ARMATURE', enter_editmode=True, align='WORLD', location=(0, 0, 0)) bpy.ops.object.editmode_toggle() Traceback (most recent call last): File "C:\Users\isaia\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\iqe_import.py", line 945, in execute import_iqm(self.properties.filepath, self.bone_axis) File "C:\Users\isaia\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\iqe_import.py", line 920, in import_iqm make_model(iqmodel, bone_axis, dir) File "C:\Users\isaia\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\iqe_import.py", line 904, in make_model meshobj = make_mesh_data(iqmodel, name, meshes[name], amtobj, dir) File "C:\Users\isaia\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\iqe_import.py", line 655, in make_mesh_data mesh.show_double_sided = False AttributeError: 'Mesh' object has no attribute 'show_double_sided'

location: unknown location:-1


Thank you in advance!

ccxvii commented 3 years ago

I'm not surprised the importer has finally broken! It's been a couple of years since it was written, and I have not kept up with the new Blender changes....

1sa1as commented 3 years ago

I'm not surprised the importer has finally broken! It's been a couple of years since it was written, and I have not kept up with the new Blender changes....

I understand that new versions can broke the plugins, but I tried with previous versions and I got the same error... for example, it says iqe_import.py has support for Blender 2.8, so I tryed the 2.80 version and it didn't worked..

Thank you for your attention!

errantSquam commented 2 years ago

It's been a solid year, but I'm new to using this tool, and after taking a look at Blender's API, replacing 'show_double_sided' with 'use_mirror_topology' fixed the issue. Hopefully this helps anyone who's trying to import IQM models in the future!

LegendaryGuard commented 2 years ago

Yeah, replacing this line (655 from iqe_import.py) to mesh.use_mirror_topology = False Worked for me, too.

https://github.com/ccxvii/asstools/blob/0c52fe1abfa13988d05238d4f45c7376576d6cc3/iqe_import.py#L655