Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-28 23:40:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-28 23:40:05 +0400
commitb5b48bd53a265c57884f2b768141d9a886113ec5 (patch)
tree6153a1149007874a3964bccb03cc1c2a98a7c3f9 /source/blender/makesrna/intern/rna_image.c
parent651efb37630ed7a017870e0ab61d268af9716478 (diff)
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_image.c')
-rw-r--r--source/blender/makesrna/intern/rna_image.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 92c860a8074..4ac7624e731 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -171,9 +171,19 @@ static void rna_Image_file_format_set(PointerRNA *ptr, int value)
{
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;
+ }
}
}