I spent $15 buying a tool which is able to make multiple Bake images. After using it, I had a lot of problems where the UVMap for the selected item would be terribly mangled. I tried over and over to figure out what was happing. Looked at the code, and found a bug. Reported it to the manufacturer, but more importantly, using the tool started working.
| Location of Script Files | C:\Users\dan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\baketool |
|---|
I found a bug: In the file bt_cyclespake.py, at line 135, you are again iterating through Jobs. Unfortunately, you don't look that the Job is enabled before continuing on. On my PC, I had 4 jobs, and the 4th job had ATLAS, but I was running the 2nd job only. So because the code looked at all Jobs it sees that ATLAS setting and part of the code runs as the Settings.mode == ATLAS, but that is not what I needed, and the code crashes.
The solution is to add a “continue” to skip disabled Jobs, like this (just like you have elsewhere):
# Pack UVs para cada Job que precisa for ActiveJob in Jobs: if not ActiveJob.enabled: continue
I haven't fully tested the code, but this fix does stop the UV from being trashed. I'm noticing you also have a block in there called
# UV Unwrapper System: Experimental
It appears to do almost the same thing as the stuff after it. Maybe it should have not been included.
Hope this was helpful.
11/10/2017