Skip to content

Commit

Permalink
slight changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarcontar committed Sep 17, 2020
1 parent 6128f8d commit 62966fc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions io_mesh_w3d/common/utils/material_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def create_materials(context, mesh_struct, mesh, triangles):
b_mesh = bmesh.new()
b_mesh.from_mesh(mesh)

# shader material stuff
if mesh_struct.shader_materials:
# TODO: check for no tx coords and more than 1 shader material
tx_coords = mesh_struct.material_passes[0].tx_coords
Expand All @@ -24,7 +23,6 @@ def create_materials(context, mesh_struct, mesh, triangles):
material = create_shader_material(context, mesh_struct.shader_materials[0], uv_layer)
mesh.materials.append(material)

# vertex material stuff
elif mesh_struct.vert_materials:
# TODO: check for no tx coords and more than 1 vertex material / material pass
tx_coords = mesh_struct.material_passes[0].tx_stages[0].tx_coords[0]
Expand Down
1 change: 1 addition & 0 deletions io_mesh_w3d/common/utils/mesh_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def create_mesh(context, mesh_struct, coll):
mesh.from_pydata(mesh_struct.verts, [], triangles)

mesh.normals_split_custom_set_from_vertices(mesh_struct.normals)
mesh.use_auto_smooth = True # TODO: remove this and fix tests accordingly

mesh.update()
mesh.validate()
Expand Down
3 changes: 0 additions & 3 deletions tests/w3x/cases/test_roundtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ def test_roundtrip_splitted(self):

# check created include entries
root = find_root(self, self.outpath() + 'output_skn.w3x')
print('##############')
for incl in root.find('Includes').findall('Include'):
print(incl.get('source'))
self.assertEqual(6, len(root.find('Includes').findall('Include')))

self.reset_scene()
Expand Down

0 comments on commit 62966fc

Please sign in to comment.