[Bf-blender-cvs] [d75bfdf] master: Fix T44308 painting in 2D editor offset by one pixel.
Antony Riakiotakis
noreply at git.blender.org
Thu Apr 9 12:19:09 CEST 2015
Commit: d75bfdfafcfeb7fa02496be70f57e6fc15d0c397
Author: Antony Riakiotakis
Date: Thu Apr 9 12:18:51 2015 +0200
Branches: master
https://developer.blender.org/rBd75bfdfafcfeb7fa02496be70f57e6fc15d0c397
Fix T44308 painting in 2D editor offset by one pixel.
Not sure why this was so in the first place but changing it seems OK.
===================================================================
M source/blender/editors/sculpt_paint/paint_image_2d.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 9d39eea..eff6046 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -996,8 +996,8 @@ static ImBuf *paint_2d_lift_clone(ImBuf *ibuf, ImBuf *ibufb, int *pos)
static void paint_2d_convert_brushco(ImBuf *ibufb, const float pos[2], int ipos[2])
{
- ipos[0] = (int)floorf((pos[0] - ibufb->x / 2) + 1.0f);
- ipos[1] = (int)floorf((pos[1] - ibufb->y / 2) + 1.0f);
+ ipos[0] = (int)floorf((pos[0] - ibufb->x / 2));
+ ipos[1] = (int)floorf((pos[1] - ibufb->y / 2));
}
static int paint_2d_op(void *state, ImBuf *ibufb, unsigned short *curveb, unsigned short *texmaskb, const float lastpos[2], const float pos[2])
More information about the Bf-blender-cvs
mailing list