[Bf-blender-cvs] [ef2a38a] master: Bake-API: fix potential error for non square images
Dalai Felinto
noreply at git.blender.org
Wed Aug 27 18:57:21 CEST 2014
Commit: ef2a38a9665c3f39ccdead8e1177f9b9c2e92538
Author: Dalai Felinto
Date: Wed Aug 27 18:56:08 2014 +0200
Branches: master
https://developer.blender.org/rBef2a38a9665c3f39ccdead8e1177f9b9c2e92538
Bake-API: fix potential error for non square images
Not reported, I wonder why, this should be easy to reproduce. I guess
people really like their textures square ;)
===================================================================
M source/blender/editors/object/object_bake_api.c
===================================================================
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index e21f565..5853bb0 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -214,7 +214,7 @@ static bool write_internal_bake_pixels(
IMB_buffer_float_from_float(
ibuf->rect_float, buffer, ibuf->channels,
IB_PROFILE_LINEAR_RGB, IB_PROFILE_LINEAR_RGB, false,
- ibuf->x, ibuf->y, ibuf->x, ibuf->y);
+ ibuf->x, ibuf->y, ibuf->x, ibuf->x);
}
else {
IMB_buffer_byte_from_float(
@@ -227,7 +227,7 @@ static bool write_internal_bake_pixels(
if (is_float) {
IMB_buffer_float_from_float_mask(
ibuf->rect_float, buffer, ibuf->channels,
- ibuf->x, ibuf->y, ibuf->x, ibuf->y, mask_buffer);
+ ibuf->x, ibuf->y, ibuf->x, ibuf->x, mask_buffer);
}
else {
IMB_buffer_byte_from_float_mask(
@@ -293,7 +293,7 @@ static bool write_external_bake_pixels(
IMB_buffer_float_from_float(
ibuf->rect_float, buffer, ibuf->channels,
IB_PROFILE_LINEAR_RGB, IB_PROFILE_LINEAR_RGB, false,
- ibuf->x, ibuf->y, ibuf->x, ibuf->y);
+ ibuf->x, ibuf->y, ibuf->x, ibuf->x);
}
else {
if (!is_noncolor) {
More information about the Bf-blender-cvs
mailing list