Skip to content

Commit

Permalink
Update sector_import.py
Browse files Browse the repository at this point in the history
add meshappearance to the custom data saved to objects
  • Loading branch information
Simarilius-uk authored Jun 30, 2024
1 parent 0d126f6 commit 54234b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion i_scene_cp77_gltf/importers/sector_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,9 @@ def importSectors( filepath='', want_collisions=False, am_modding=False, with_ma
meshname = data['meshRef']['DepotPath']['$value'].replace('\\', os.sep)
if meshname:
#print('Mesh name is - ',meshname, e['HandleId'])
#meshAppearance = data['meshAppearance']['$value'] # Need to actually use this
meshAppearance='default'
if 'meshAppearance' in data.keys():
meshAppearance = data['meshAppearance']['$value'] # Need to actually use this
if(meshname != 0):
#print('Mesh - ',meshname, ' - ',i, e['HandleId'])
groupname = os.path.splitext(os.path.split(meshname)[-1])[0]
Expand Down Expand Up @@ -950,6 +952,7 @@ def importSectors( filepath='', want_collisions=False, am_modding=False, with_ma
new['debugName']=e['Data']['debugName']['$value']
new['sectorName']=sectorName
new['pivot']=inst['Pivot']
new['meshAppearance']=meshAppearance

print(new['nodeDataIndex'])
# Should do something with the Advertisements lightData bits here
Expand Down

0 comments on commit 54234b6

Please sign in to comment.