and-rad / texture_bake

Streamlined PBR texture baking for Blender
GNU General Public License v3.0
4 stars 0 forks source link

Unused maps disappear when Blender is closed #2

Closed and-rad closed 2 years ago

and-rad commented 2 years ago

Maps that are baked exist in a Blender file like any other texture, which means they might not be used in any material and thus have no users. Data blocks without users are deleted when the Blend file is closed.

A way to prevent that would be to add a fake user to any baked texture. Unused textures can still easily be cleaned up by checking against the number of users and taking the fake user into account. This could work similarly to Substance Painter's "Save and Compact" menu action.

and-rad commented 2 years ago

After some deliberation, it was decided that this can stay as is for now. Textures that are not used immediately can be re-baked individually at a later time with ease. This will also keep the file size small without the user having to do anything.