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:
authorBrecht Van Lommel <brecht@blender.org>2022-03-11 19:50:57 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-03-21 18:38:13 +0300
commit6e4d2fa9140864a13356b07ffca082817822987f (patch)
treecb8894c3b6898e82410f3edffe2fb9d85a3a2399 /source/blender/makesrna
parent4abb8a14a2133f876c7718a8e09284baa62b1cf5 (diff)
Cleanup: add image_format.cc for functions related to ImageFormatData
Also fixes missing code to read/write/free/copy color management settings in various places. This can't be set through the UI currently, but still should be handled consistently.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_image.c7
-rw-r--r--source/blender/makesrna/intern/rna_scene.c1
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 56e23278176..3a93a44e0d1 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -13,6 +13,7 @@
#include "BLI_utildefines.h"
#include "BKE_image.h"
+#include "BKE_image_format.h"
#include "BKE_node_tree_update.h"
#include "DEG_depsgraph.h"
@@ -238,8 +239,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 : IMB_FTYPE_NONE,
- ibuf ? &ibuf->foptions : NULL);
+ int imtype = BKE_ftype_to_imtype(ibuf ? ibuf->ftype : IMB_FTYPE_NONE,
+ ibuf ? &ibuf->foptions : NULL);
BKE_image_release_ibuf(image, ibuf, NULL);
@@ -251,7 +252,7 @@ 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 */
ImbFormatOptions options;
- int ftype = BKE_image_imtype_to_ftype(value, &options);
+ int ftype = BKE_imtype_to_ftype(value, &options);
BKE_image_file_format_set(image, ftype, &options);
}
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index d398dadbec7..c8af634daa9 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -633,6 +633,7 @@ const EnumPropertyItem rna_enum_transform_orientation_items[] = {
# include "BKE_gpencil.h"
# include "BKE_idprop.h"
# include "BKE_image.h"
+# include "BKE_image_format.h"
# include "BKE_layer.h"
# include "BKE_main.h"
# include "BKE_mesh.h"