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>2019-06-03 17:21:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-03 17:24:38 +0300
commit1f650c402d3b43eee7cb51c7d4f373ba82ac2116 (patch)
treeba2432fe9424ae545d3758d37ec8ebb0419a2ba5 /source/blender/makesrna/intern/rna_image_api.c
parente3f2034e7b925bc7e31e65051842cf26d70a20bc (diff)
Cleanup: style, use braces in RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 553dbeeb97b..a26b4c6b6e4 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -96,8 +96,9 @@ static void rna_Image_save_render(
BKE_reportf(reports, RPT_ERROR, "Could not write image: %s, '%s'", strerror(errno), path);
}
- if (write_ibuf != ibuf)
+ if (write_ibuf != ibuf) {
IMB_freeImBuf(write_ibuf);
+ }
}
BKE_image_release_ibuf(image, ibuf, lock);
@@ -123,8 +124,9 @@ static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *r
if (IMB_saveiff(ibuf, filename, ibuf->flags)) {
image->type = IMA_TYPE_IMAGE;
- if (image->source == IMA_SRC_GENERATED)
+ if (image->source == IMA_SRC_GENERATED) {
image->source = IMA_SRC_FILE;
+ }
IMB_colormanagement_colorspace_from_ibuf_ftype(&image->colorspace_settings, ibuf);
@@ -196,8 +198,9 @@ static void rna_Image_update(Image *image, ReportList *reports)
return;
}
- if (ibuf->rect)
+ if (ibuf->rect) {
IMB_rect_from_float(ibuf);
+ }
ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;
@@ -233,8 +236,9 @@ static int rna_Image_gl_touch(Image *image, ReportList *reports, int frame)
BKE_image_tag_time(image);
- if (image->gputexture[TEXTARGET_TEXTURE_2D] == NULL)
+ if (image->gputexture[TEXTARGET_TEXTURE_2D] == NULL) {
error = rna_Image_gl_load(image, reports, frame);
+ }
return error;
}