diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-13 12:25:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-13 12:32:15 +0300 |
commit | a8f9a2493915bf9384553b3933593a5296e70a1c (patch) | |
tree | b92994b73297c1f9bb439c1d38dae373985065b7 /source/blender/makesrna/intern/rna_image.c | |
parent | 4a3b26dd5e7fc0fb0d95271859ee7b780add2a88 (diff) |
Cleanup: use IMB_FTYPE_NONE instead of 0 for imbuf format comparison
Image format code checked the file type against an enum except for
zero which is used when the format can't be detected.
Also add doc-strings to some of the image file type callbacks.
Diffstat (limited to 'source/blender/makesrna/intern/rna_image.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_image.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index ea36289d361..504a4a6bdf3 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -235,7 +235,8 @@ static int rna_Image_file_format_get(PointerRNA *ptr) { Image *image = (Image *)ptr->data; ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL); - int imtype = BKE_image_ftype_to_imtype(ibuf ? ibuf->ftype : 0, ibuf ? &ibuf->foptions : NULL); + int imtype = BKE_image_ftype_to_imtype(ibuf ? ibuf->ftype : IMB_FTYPE_NONE, + ibuf ? &ibuf->foptions : NULL); BKE_image_release_ibuf(image, ibuf, NULL); |