diff options
author | Jacques Lucke <mail@jlucke.com> | 2018-10-31 15:35:53 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2018-10-31 15:42:33 +0300 |
commit | a3802f66e22e57115f48545a39bf41959eb16fad (patch) | |
tree | 9389d31f0f104d00b2a10b86f4afe6cfbdd84eeb /source/blender/makesdna/DNA_object_types.h | |
parent | 0727abf1bc70a55426716f5826532ea3ec4dd924 (diff) |
Image Empties: More visibility settings
Support for showing images in background/foreground and only in perspective/orthographic view.
Internally the depth of the image is modified in the fragment shader by setting `gl_FragDepth` explicitly.
The UI still needs some work to improve usability, see D3863 for details.
Currently there is one duplicated function, not sure how to best deduplicate it yet. (`is_image_empty_visible`)
Reviewer: fclem, brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3863
Diffstat (limited to 'source/blender/makesdna/DNA_object_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index d19c29574b6..fca6a8767be 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -296,6 +296,9 @@ typedef struct Object { float ima_ofs[2]; /* offset for image empties */ ImageUser *iuser; /* must be non-null when object is an empty image */ + char empty_image_visibility_flag; + char empty_image_depth; + char pad11[6]; ListBase lodlevels; /* contains data for levels of detail */ LodLevel *currentlod; @@ -596,6 +599,17 @@ enum { OB_DUPLI_FLAG_RENDER = 1 << 1, }; +/* ob->empty_image_depth */ +#define OB_EMPTY_IMAGE_DEPTH_DEFAULT 0 +#define OB_EMPTY_IMAGE_DEPTH_FRONT 1 +#define OB_EMPTY_IMAGE_DEPTH_BACK 2 + +/* ob->empty_image_visibility_flag */ +enum { + OB_EMPTY_IMAGE_VISIBLE_PERSPECTIVE = 1 << 0, + OB_EMPTY_IMAGE_VISIBLE_ORTHOGRAPHIC = 1 << 1, +}; + #define MAX_DUPLI_RECUR 8 #ifdef __cplusplus |