[Bf-blender-cvs] [d12244cea06] master: Cleanup: move Image flags into DNA, for consistency with other types
Brecht Van Lommel
noreply at git.blender.org
Fri May 17 18:00:21 CEST 2019
Commit: d12244cea06ebd1c477fbc7eb31ebeb97ac00af2
Author: Brecht Van Lommel
Date: Fri May 17 11:42:34 2019 +0200
Branches: master
https://developer.blender.org/rBd12244cea06ebd1c477fbc7eb31ebeb97ac00af2
Cleanup: move Image flags into DNA, for consistency with other types
===================================================================
M source/blender/blenkernel/BKE_image.h
M source/blender/makesdna/DNA_image_types.h
===================================================================
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index d5304ec5434..9e5a761d02d 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -153,29 +153,6 @@ struct RenderData;
struct RenderPass;
struct RenderResult;
-/* ima->source; where image comes from */
-#define IMA_SRC_CHECK 0
-#define IMA_SRC_FILE 1
-#define IMA_SRC_SEQUENCE 2
-#define IMA_SRC_MOVIE 3
-#define IMA_SRC_GENERATED 4
-#define IMA_SRC_VIEWER 5
-
-/* ima->type, how to handle/generate it */
-#define IMA_TYPE_IMAGE 0
-#define IMA_TYPE_MULTILAYER 1
-/* generated */
-#define IMA_TYPE_UV_TEST 2
-/* viewers */
-#define IMA_TYPE_R_RESULT 4
-#define IMA_TYPE_COMPOSITE 5
-
-enum {
- IMA_GENTYPE_BLANK = 0,
- IMA_GENTYPE_GRID = 1,
- IMA_GENTYPE_GRID_COLOR = 2,
-};
-
/* ima->ok */
#define IMA_OK 1
#define IMA_OK_LOADED 2
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index 0aceeda20d5..3e42aa17492 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -193,15 +193,43 @@ enum {
IMA_GPU_MIPMAP_COMPLETE = (1 << 1),
};
-/* ima->type and ima->source moved to BKE_image.h, for API */
+/* Image.source, where the image comes from */
+enum {
+ IMA_SRC_CHECK = 0,
+ IMA_SRC_FILE = 1,
+ IMA_SRC_SEQUENCE = 2,
+ IMA_SRC_MOVIE = 3,
+ IMA_SRC_GENERATED = 4,
+ IMA_SRC_VIEWER = 5,
+};
+
+/* Image.type, how to handle or generate the image */
+enum {
+ IMA_TYPE_IMAGE = 0,
+ IMA_TYPE_MULTILAYER = 1,
+ /* generated */
+ IMA_TYPE_UV_TEST = 2,
+ /* viewers */
+ IMA_TYPE_R_RESULT = 4,
+ IMA_TYPE_COMPOSITE = 5,
+};
+
+/* Image.gen_type */
+enum {
+ IMA_GENTYPE_BLANK = 0,
+ IMA_GENTYPE_GRID = 1,
+ IMA_GENTYPE_GRID_COLOR = 2,
+};
/* render */
#define IMA_MAX_RENDER_TEXT (1 << 9)
-/* gen_flag */
-#define IMA_GEN_FLOAT 1
+/* Image.gen_flag */
+enum {
+ IMA_GEN_FLOAT = 1,
+};
-/* alpha_mode */
+/* Image.alpha_mode */
enum {
IMA_ALPHA_STRAIGHT = 0,
IMA_ALPHA_PREMUL = 1,
More information about the Bf-blender-cvs
mailing list