diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-21 04:41:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-21 04:41:00 +0400 |
commit | 28780342eddb0e1e767bf64d69cb99bd138d621f (patch) | |
tree | b73aa42e1796a9e3803736ced4994cbe65f900ef /source/blender/blenkernel/intern/image.c | |
parent | 76e91d7a5f8c253543bd1c938c8e74872d7a6c81 (diff) |
fix/workaround [#28040] float images reduced to 256 levels per channel upon save
Generated images would not be re-generated with a float buffer on load, even when selected on creation.
Now save the float buffer setting as a generated image flag.
This means you can enable before baking to enable baking to a float buffer.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index c48497c45a1..ab67d7e3f25 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -432,6 +432,7 @@ Image *BKE_add_image_size(unsigned int width, unsigned int height, const char *n ima->gen_x= width; ima->gen_y= height; ima->gen_type= uvtestgrid; + ima->gen_flag |= (floatbuf ? IMA_GEN_FLOAT : 0); ibuf= add_ibuf_size(width, height, name, depth, floatbuf, uvtestgrid, color); image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0); @@ -2172,7 +2173,7 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r) /* UV testgrid or black or solid etc */ if(ima->gen_x==0) ima->gen_x= 1024; if(ima->gen_y==0) ima->gen_y= 1024; - ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 24, 0, ima->gen_type, color); + ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 24, (ima->gen_flag & IMA_GEN_FLOAT) != 0, ima->gen_type, color); image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0); ima->ok= IMA_OK_LOADED; } |