Page MenuHome

Option to save external data (images) when saving the blend
Changes PlannedPublic

Authored by Campbell Barton (campbellbarton) on Mar 12 2014, 7:05 PM.

Details

Reviewers
None
Summary

This adds a save option to save edited / painted images.


Note, I'd like to have some better way to do this then simply adding another option, it seems a but weak and doesn't really fit into painting workflow.

But doing this by default is a bit risky too.

Diff Detail

Event Timeline

Campbell Barton (campbellbarton) updated this revision to Unknown Object (????).Jun 23 2014, 7:48 AM

update to master

When I first saw the automatically pack into .blend option in File > External data I thought this is what it did (I now know better).

Perhaps this could be added as a part of that option?

This is probably going to make a lot of people who bake a lot very happy.

I am starting to see the problem you have with Texture Paint and saving externally. For baking, auto save is exactly what's needed but with Texture Paint this could be a huge problem.
Painting on a 4k texture that auto saves every stroke would be unusable because of the constant hard-drive access.

Maybe if there were a new window type that looks like a node editor but is specifically for handling the scenes textures and is populated with one node for every texture present, then an autosave option could simply be included as a checkbox on each node.
When using Texture Paint, the checkbox could be automatically deactivated or bypassed with a warning stating that auto save is not compatible with Painting. Then a person could re-enable it, if desired, using the nodes checkbox when painting is finished.

Also, an ActiveTexture checkbox could be added for baking using Cycles so there is no more confusion with the last selected texture being the one which was accidentally baked to. The one with the checked off box would always be the one used.

Hopefully this won't bother you that I'm posting this here instead of as a task. I was going to start a task but the instructions specifically say that they are not for users who want to make feature requests so I'll just put it here since it is related. If you want me to change this because I've made a mess here then let me know and I'll delete this and move it to where ever you feel is appropriate.

It looks good to me. I batch baked 11 objects then saved the scene with this option. All the new textures were saved as expected.

Presets for texture save options would be nice. Either way, this patch is a big step forward.

It looks like I did end up overwriting some images I baked because I was baking different passes using the same name to save space in the UV Image Editor drop-down. Maybe this could be fixed by saving images as incremental versions such as bake.001 for the first overwrite, then bake.002.

Searching the file directory for .0 should weed them all out quickly so they can be given more appropriate names and/or deleted if unnecessary. I suppose the names could have a more reliable search key added in.

I have a weird error here. Here's a pic. The textures are named SM1, SM2, SM3, etc... but the error box refers to them as IMSM1, IMSM2, etc...

I can save them manually by selecting the in the UV Image Editor and pressing Alt+s. They were drag and dropped into the Node Editor and they display fine when I connect them to an Emission node and activate the Viewport Render. It's only the new save code that is sometimes having a problem finding the path.

source/blender/blenkernel/intern/image.c
3651

Probably it should write to a temp file then rename, to avoid overwriting the image and running into a diskfull or so.

Campbell Barton (campbellbarton) planned changes to this revision.Feb 4 2015, 8:59 PM