Page MenuHome

TexPaint Workflow: "Generated" Images are now packed in the .blend file automatically by default
Needs RevisionPublic

Authored by Joshua Leung (aligorith) on May 23 2016, 10:18 AM.

Details

Summary
This commit adds a new feature, "Auto Pack" which can be enabled per Image datablock.
When enabled, this option will cause that Image to get packed (or re-packed) to the
.blend file when the file is saved. Compared to the option in the File Menu (which
is aimed more at external files which have been loaded in), this option is aimed more
at resources which originated originally.

== Why ==
This feature was introduced as a way of improving the usability of the texpainting
workflow. The two key benefits of this are:
1) It becomes much harder to accidentally lose hand painted textures, created in
   Blender using the "Generated Color" image type as a base.

   AFAIK, in many cases, the Generated Color image type is the most common or easiest
   way to get an image on your objects to start painting them. The "Add Image Slot"
   workflow in Texture Paint mode will by default generate something like this as the
   initial texture to use.

2) You don't have to worry about saving your textures out into separate files until
   you need/want to. In the meantime, you can just keep painting on the image and
   saving the .blend file/project normally, without worrying whether you've remembered
   to separately save the changes to the source image(s) or not.

Downsides:
1) Unsuspecting users may accidentally bloat their .blend files with lots of packed
   textures. For this reason, this option is currently only enabled by default on
   images which started off as "Generated"

2) When you do finally save the file, the auto pack option is not disabled. This may
   not be expected, but also by being conservative here, we may prevent some more accidents.

3) I'm not sure whether by just packing the images without clearing what may have
   been packed before, we may end up with multiple copies/versions of the same image packed
   into the file - one for every time the file is saved.

Diff Detail

Event Timeline

Joshua Leung (aligorith) retitled this revision from to TexPaint Workflow: "Generated" Images are now packed in the .blend file automatically by default.May 23 2016, 10:18 AM
Joshua Leung (aligorith) updated this object.
Joshua Leung (aligorith) updated this revision to Diff 6743.
Sergey Sharybin (sergey) requested changes to this revision.

I'm not really sure it's best implementaiton. You're setting IMA_AUTO_PACK automatically but never reset this flag. What id leads to is imagine such a workflow:

  • You've added a new image
  • You've baked to it
  • You saved the image using F3

Currently the image will not be packed, which is correct. But with this change you would not only save the file to disk, but also pack it into .blend which is not what we really want.

Surely there's an option to clear auto pack flag but i don't think it is really friendly for artists.

This revision now requires changes to proceed.Jul 14 2016, 3:13 PM

I'm wondering if we need an option for this,
Couldn't we detect generated images which are dirty and always pack these images on save?


There are some details to figure out, eg. maybe we want to grey out generated options so users don't accidentally wipe their image, but think this can work.

Think Campbell's suggestion would work fine, don't really see a need to add an option for this. We could also use @Bastien Montagne (mont29)'s asset manager work to save both, the clean and the dirty image as different versions. Or heck, couldn't the dirty image be an override even?