Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

Multiple material libraries maybe? #10

Open
dt192 opened this issue Apr 17, 2020 · 4 comments
Open

Multiple material libraries maybe? #10

dt192 opened this issue Apr 17, 2020 · 4 comments

Comments

@dt192
Copy link

dt192 commented Apr 17, 2020

`Traceback (most recent call last):
File "Blend2Halo2-Modified.py", line 534, in execute
return write_asset(context, self.filepath, triangulate_faces=self.triangulate_faces, split_flat=self.split_flat)
File "Blend2Halo2-Modified.py", line 322, in write_asset
file.write('\n{0}'.format(materials_list.index(mesh.materials[poly.material_index].name)))
AttributeError: 'NoneType' object has no attribute 'name'

location: :-1`

@General-101
Copy link

Upload the .blend file that causes this error

@dt192
Copy link
Author

dt192 commented Apr 17, 2020

Seems to be when the material is parented to the object instead of the mesh.

error.zip

Confirmed. It's when the material is linked to the 'Object' rather than the 'Data'.

@General-101
Copy link

Ye, I see it. I'll need to update the script to work more like the JMS script to prevent this error.
This will take a while. Until then just set the material to be linked to the mesh.

@dt192
Copy link
Author

dt192 commented Apr 18, 2020

Work around for this for anybody else having issues. There is an addon included with Blender called material utilities. Install that, hit shift+Q and change the links to data. It's not great, as it doesn't unlink the material from the object, so you end up with double linked material unless you manually unlink it from the parent, but it does at least make the ass exporter work as expected.

blenderissuesolution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants