Skip to content

Commit

Permalink
Merge pull request WolvenKit#179 from Simarilius-uk/OS_support
Browse files Browse the repository at this point in the history
Fix for trauma team gloves (check name prop exists before comparing)
  • Loading branch information
Simarilius-uk authored Oct 31, 2024
2 parents 6f0cfa7 + 3d1a043 commit a4749d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion i_scene_cp77_gltf/importers/import_with_materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ def import_mats(BasePath, DepotPath, exclude_unused_mats, existingMeshes, gltf_i
start_time = time.time()
for mat in validmats.keys():
for m in mats: #obj['Materials']:
if 'Name' not in m.keys():
continue
if m['Name'] != mat:
continue
if 'BaseMaterial' in m.keys():
Expand Down Expand Up @@ -268,7 +270,7 @@ def import_mats(BasePath, DepotPath, exclude_unused_mats, existingMeshes, gltf_i
if matname in validmats.keys():
index = 0
for rawmat in mats:
if rawmat["Name"] == matname:
if 'Name' in rawmat.keys() and rawmat["Name"] == matname:
try:
bpymat = Builder.create(mats, index)
if bpymat:
Expand Down

0 comments on commit a4749d1

Please sign in to comment.