Fixes #43
It happened because it looped over the list of textures, being in this case (with orl being the broken dog picture)
['smk', 'orl']
It started with the first element, smk, which it rescaled. First it removed the original from the model:
['orl']
Then it added back the rescaled one:
['orl', 'smk']
But wait - the list has been reordered! So when the loop gets to the second element, it checks smk again, sees that it's now fine, and skips orl entirely, leaving it broken.
This fixes the issue by using names instead of indexes to loop over it, so it works with a reordered list. This could also be fixed by making the replacement not reorder the list.
I tried to use list comprehensions which I haven't used used before so it might be a bit of a mess, feel free to do it a cleaner way
Fixes #43 It happened because it looped over the list of textures, being in this case (with orl being the broken dog picture)
['smk', 'orl']
It started with the first element,smk
, which it rescaled. First it removed the original from the model:['orl']
Then it added back the rescaled one:['orl', 'smk']
But wait - the list has been reordered! So when the loop gets to the second element, it checkssmk
again, sees that it's now fine, and skipsorl
entirely, leaving it broken. This fixes the issue by using names instead of indexes to loop over it, so it works with a reordered list. This could also be fixed by making the replacement not reorder the list. I tried to use list comprehensions which I haven't used used before so it might be a bit of a mess, feel free to do it a cleaner way