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
This commit is contained in:
Jacques Lucke
2018-10-31 13:35:53 +01:00
parent 0727abf1bc
commit a3802f66e2
8 changed files with 109 additions and 10 deletions

View File

@@ -56,6 +56,10 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
layout.separator()
layout.prop(ob, "empty_display_size", text="Size")
layout.prop(ob, "empty_image_depth", text="Depth", expand=True)
layout.prop(ob, "show_empty_image_orthographic", text="Display Orthographic")
layout.prop(ob, "show_empty_image_perspective", text="Display Perspective")
classes = (