In its current state, Blender’s texture baking design is extremely dangerous and can result in loss of lots of user data. Here’s an example case:
- You have an object with multiple materials, each of them having some textures
- You decide to bake simple AO/Cavity map for it
- You make a duplicate of the object for the purpose of baking, so you don’t modify desired materials of the original one.
- You create one more material slot, select all of the object faces, and assign them to have the new baking material
- You setup this new material with AO maps to create convex/concave masks for dirtmaps
- You create a new image texture to contain the baked information and select it to make it active for baking
- You set up and press bake
Now, you’d assume only actually used materials are being baked, since all the other material slots do not have even one face assigned, yet during the baking process, every single image texture node which is selected in ever material slot is now considered active, and therefore baking target.
Once you are done with baking, you proceed to use your baked texture. After some time passes, you decide to close the Blender. A popup window appears asking you if you want to save # of modified images. If you are unsuspecting user, and click yes, then you inevitably override all the source textures loaded from your hard drive with unintended baked data (usually pitch black) without any way to revert this. This means one click can irrecoverably destroy many textures user loaded in Blender without intention of ever modifying them.
I know baking overhaul is not a simple thing to accomplish, but before its done, some temporary fix should be introduced here to prevent users from accidentally destroying their texture libraries.
Right now, the main design issue is that it’s not obvious for many users that clicking bake button simply means “Override the data of all the image texture nodes in all the material slots of the currently selected objects if the image texture nodes are selected (have white outline around them).” Specifying image texture as a target baking should require way more explicit action than this.