Maradonna90 / NewGAN-Manager

A tool to generate and manage xml configs for the Newgen Facepack.
GNU General Public License v3.0
171 stars 34 forks source link

[BUG] prf_imgs.remove accidentally messing with 'preserve' and 'overwrite' mode ? #179

Closed guiseiz closed 8 months ago

guiseiz commented 1 year ago

there might be an issue in the logic that can cause the duplicates to not work as intended. The problem lies in the generate_mapping method when the mode is set to "Preserve" or "Overwrite".

In the code block where it checks for duplicates and removes images from the prf_imgs list, there is a line that can inadvertently shorten the selection pool of images for ethnicities:

prf_imgs.remove(xml_data[player[0]]["image"])

This line attempts to remove an image from prf_imgs based on the player's ID. However, if the same image is used for multiple players, removing it once will reduce the available selection pool for subsequent players with the same ethnicity. This unintended removal can result in duplicates not being allowed effectively.

this might be the culprit behind the '...has no faces left for mapping. Skipping player' issue

Maradonna90 commented 8 months ago

no it essentially remove images from the profile, so images that are already used. Making them available again.