diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-02 17:04:38 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-02 17:06:35 +0400 |
commit | 617131410c74bc0291ede50803e5d9badff2a0c9 (patch) | |
tree | 1303305d7df2cd7da67f6bf04358a77f1aae2d73 /source/blender/blenloader/intern | |
parent | 9ac0b4ff056060cab78b2b787bc567d72295f3f9 (diff) |
Fix T42008: Dragging and packing issue about new blank image
The issue was caused by the fact that we never used to store the
generated image color in DNA, so image reload will loose this
information.
Now we store the color in DNA, making ti so re-loading the image
will preserve it's generated color.
It is now also possible to change generated image color using the
color swatch in image properties after the image was created.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index b2a29e9d1cb..4fd033ca516 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -390,4 +390,11 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + if (!DNA_struct_elem_find(fd->filesdna, "Image", "float", "gen_color")) { + Image *image; + for (image = main->image.first; image != NULL; image = image->id.next) { + image->gen_color[3] - 1.0f; + } + } } |