[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32758] trunk/blender/source/blender: bugfix [#24439] Smear 2D paint fails
Campbell Barton
ideasman42 at gmail.com
Thu Oct 28 21:40:05 CEST 2010
Revision: 32758
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32758
Author: campbellbarton
Date: 2010-10-28 21:40:05 +0200 (Thu, 28 Oct 2010)
Log Message:
-----------
bugfix [#24439] Smear 2D paint fails
small unrelated change: when setting the image type of an image, loop over all its Imbufs and set them.
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
trunk/blender/source/blender/makesrna/intern/rna_image.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2010-10-28 17:46:31 UTC (rev 32757)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2010-10-28 19:40:05 UTC (rev 32758)
@@ -4178,7 +4178,7 @@
int a, tot;
imapaint_set_region(region, 0, 0, pos[0], pos[1], ibufb->x, ibufb->y);
- tot= imapaint_torus_split_region(region, ibuf, ibufb);
+ tot= imapaint_torus_split_region(region, ibufb, ibuf);
for(a=0; a<tot; a++)
IMB_rectblend(ibufb, ibuf, region[a].destx, region[a].desty,
Modified: trunk/blender/source/blender/makesrna/intern/rna_image.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_image.c 2010-10-28 17:46:31 UTC (rev 32757)
+++ trunk/blender/source/blender/makesrna/intern/rna_image.c 2010-10-28 19:40:05 UTC (rev 32758)
@@ -171,9 +171,19 @@
{
Image *image= (Image*)ptr->data;
if(BKE_imtype_is_movie(value) == 0) { /* should be able to throw an error here */
- ImBuf *ibuf= BKE_image_get_ibuf(image, NULL);
+ ImBuf *ibuf;
+ int ftype= BKE_imtype_to_ftype(value);
+
+ /*
+ ibuf= BKE_image_get_ibuf(image, NULL);
if(ibuf)
- ibuf->ftype= BKE_imtype_to_ftype(value);
+ ibuf->ftype= ftype;
+ */
+
+ /* to be safe change all buffer file types */
+ for(ibuf= image->ibufs.first; ibuf; ibuf->next) {
+ ibuf->ftype= ftype;
+ }
}
}
More information about the Bf-blender-cvs
mailing list