From 617131410c74bc0291ede50803e5d9badff2a0c9 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 2 Oct 2014 19:04:38 +0600 Subject: 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. --- source/blender/blenloader/intern/versioning_270.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/blenloader/intern') 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; + } + } } -- cgit v1.2.3