Skip to content

Commit

Permalink
Merge pull request #245 from KH2FM-Mods-equations19/fix-vanilla-textu…
Browse files Browse the repository at this point in the history
…re-case

Fix a mismatch when vanilla textures are chosen
  • Loading branch information
zaktherobot authored Jan 15, 2024
2 parents e99f6fd + c46149a commit f3b9f13
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Module/texture.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,16 @@ def recolor_textures(self) -> list[Asset]:
)
recolor_definitions.append(recolor_definition)

# It's possible everything was vanilla
if len(recolor_definitions) == 0:
continue

image_groups: list[list[str]] = recolor["image_groups"]
for group in image_groups:
# Each group gets a unique ID
group_id = available_image_group_ids.pop(0)

if len(recolor_definitions) == 0:
# Everything was vanilla for this group, can save a little time and space by doing nothing
# (but we still need the pop above to make sure the group IDs still line up)
continue

combined_hues = "-".join(chosen_filename_hues)
_, image_ext = os.path.splitext(group[0])
destination_path = model_cache_folder / f"{model_id}-{group_id}-{combined_hues}{image_ext}"
Expand Down

0 comments on commit f3b9f13

Please sign in to comment.