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:
authorJacques Lucke <mail@jlucke.com>2018-10-31 15:35:53 +0300
committerJacques Lucke <mail@jlucke.com>2018-10-31 15:42:33 +0300
commita3802f66e22e57115f48545a39bf41959eb16fad (patch)
tree9389d31f0f104d00b2a10b86f4afe6cfbdd84eeb /source/blender/blenkernel/intern/object.c
parent0727abf1bc70a55426716f5826532ea3ec4dd924 (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/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 00031b2611c..60d800f19a8 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -832,6 +832,10 @@ void BKE_object_init(Object *ob)
ob->dt = OB_TEXTURE;
ob->empty_drawtype = OB_PLAINAXES;
ob->empty_drawsize = 1.0;
+ ob->empty_image_depth = OB_EMPTY_IMAGE_DEPTH_DEFAULT;
+ ob->empty_image_visibility_flag = (
+ OB_EMPTY_IMAGE_VISIBLE_PERSPECTIVE
+ | OB_EMPTY_IMAGE_VISIBLE_ORTHOGRAPHIC);
if (ob->type == OB_EMPTY) {
copy_v2_fl(ob->ima_ofs, -0.5f);
}