Skip to content

Commit

Permalink
don't replace original mat name with 'null' if it could not be found
Browse files Browse the repository at this point in the history
  • Loading branch information
xtremexp committed Jan 24, 2023
1 parent 547e3d2 commit 34d21fd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/org/xtx/ut4converter/MapConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -778,12 +778,19 @@ else if (StaticMesh.FILE_EXTENSION_T3D.equals(smFileExt)) {
}


/**
* Return map to get the converted name of some ressource.
* E.G: 'RadarDish_AlphaTwoSided -> WinX_radar_RadarDish_AlphaTwoSided_Mat'
* @param materialNameList
* @return
*/
private Map<String, String> getReplacementMatName(List<String> materialNameList){

Map<String, String> matNameToNewName = new HashMap<>();

for(String matName : materialNameList){
matNameToNewName.put(matName, listMatAndGetNewMatName(matName));
final String newMatName = listMatAndGetNewMatName(matName);
matNameToNewName.put(matName, newMatName != null ? newMatName : matName);
}

return matNameToNewName;
Expand Down

0 comments on commit 34d21fd

Please sign in to comment.