Skip to content

Commit 9f4bbc5

Browse files
committed
support textures without folders
1 parent 7d5e5f2 commit 9f4bbc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DenizenModelsConverter/PackMaker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void BuildPack(string rawModelPath, BBModel model, string item, st
3232
Debug("Export textures...");
3333
foreach (BBModel.Texture texture in model.Textures)
3434
{
35-
texture.CorrectedFullPath = $"{texturePath}/{texture.Folder}/{texture.Name}";
35+
texture.CorrectedFullPath = string.IsNullOrWhiteSpace(texture.Folder) ? $"{texturePath}/{texture.Name}" : $"{texturePath}/{texture.Folder}/{texture.Name}";
3636
Debug($"Exporting texture {texture.CorrectedFullPath}...");
3737
Directory.CreateDirectory($"{fullTexturePath}/{texture.Folder}/");
3838
File.WriteAllBytes($"{fullTexturePath}/{texture.Folder}/{texture.Name}.png", texture.RawImageBytes);

0 commit comments

Comments
 (0)