Skip to content

Commit

Permalink
check and remove HACK comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilaa3 committed Sep 20, 2024
1 parent 5a38d48 commit 5779a87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fast64_internal/f3d/glTF/f3d_gltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,9 @@ def gather_import_node_after_hook(self, _vnode, gltf_node, blender_object, _gltf
blender_object.use_f3d_culling = new_data.get("use_culling", True)

def gather_import_mesh_after_hook(self, gltf_mesh, blender_mesh, gltf):
if len(blender_mesh.vertex_colors) < 1:
if len(blender_mesh.vertex_colors) < 1 or not mesh_has_f3d_mat(blender_mesh):
return
color_layer = blender_mesh.vertex_colors[0] # HACK: Col should be one unless something was wrong
color_layer = blender_mesh.vertex_colors[0]
color_layer.name = "Col"
color = np.empty(len(blender_mesh.loops) * 4, dtype=np.float32)
color_layer.data.foreach_get("color", color)
Expand Down

0 comments on commit 5779a87

Please sign in to comment.