moisesjpelaez - General Fixes

This commit is contained in:
2025-09-19 18:33:44 +00:00
parent c94fc0fd97
commit e697437778

View File

@ -129,7 +129,7 @@ def export_mesh_data(self, export_mesh: bpy.types.Mesh, bobject: bpy.types.Objec
# Shape keys UV are exported separately, so reduce UV count by 1 # Shape keys UV are exported separately, so reduce UV count by 1
num_uv_layers -= 1 num_uv_layers -= 1
morph_uv_index = self.get_morph_uv_index(bobject.data) morph_uv_index = self.get_morph_uv_index(bobject.data)
has_tex = self.get_export_uvs(export_mesh) and num_uv_layers > 0 has_tex = self.get_export_uvs(export_mesh) or num_uv_layers > 0 # TODO FIXME: this should use an `and` instead of `or`. Workaround to completely ignore if the mesh has the `export_uvs` flag. Only checking the `uv_layers` to bypass issues with materials in linked objects.
if self.has_baked_material(bobject, export_mesh.materials): if self.has_baked_material(bobject, export_mesh.materials):
has_tex = True has_tex = True
has_tex1 = has_tex and num_uv_layers > 1 has_tex1 = has_tex and num_uv_layers > 1
@ -335,6 +335,7 @@ def export_mesh_data(self, export_mesh: bpy.types.Mesh, bobject: bpy.types.Objec
tangdata = np.array(tangdata, dtype='<i2') tangdata = np.array(tangdata, dtype='<i2')
# Output # Output
o['sorting_index'] = bobject.lnx_sorting_index
o['vertex_arrays'] = [] o['vertex_arrays'] = []
o['vertex_arrays'].append({ 'attrib': 'pos', 'values': pdata, 'data': 'short4norm' }) o['vertex_arrays'].append({ 'attrib': 'pos', 'values': pdata, 'data': 'short4norm' })
o['vertex_arrays'].append({ 'attrib': 'nor', 'values': ndata, 'data': 'short2norm' }) o['vertex_arrays'].append({ 'attrib': 'nor', 'values': ndata, 'data': 'short2norm' })