diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-17 12:42:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-17 18:59:26 +0300 |
commit | d12244cea06ebd1c477fbc7eb31ebeb97ac00af2 (patch) | |
tree | f8c9d1fb9c2c406579d1c11e5ee7662b5dcf4ee8 /source/blender | |
parent | bc3139d79226896cf6c2b0813a1188eda70fad09 (diff) |
Cleanup: move Image flags into DNA, for consistency with other types
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_image.h | 23 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_image_types.h | 36 |
2 files changed, 32 insertions, 27 deletions
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, |