Blender Internal: Bring back previous behavior that rendered viewport uses render visibility rather than viewport visibility.

Commit 162d6c73e3 changed the behavior of rendered viewport to use
viewport visibility, but that can cause some problems. For example,
mesh deform cage is drawn as a solid/textured mesh (not a wireframe
mesh) and its unnecessary surfaces and shadows mess up the preview.
This commit is contained in:
IRIE Shinsuke
2014-02-28 05:17:16 +09:00
parent 18fde352bf
commit d81f492d08

View File

@@ -3929,7 +3929,12 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
static bool is_object_hidden(Render *re, Object *ob)
{
if (re->r.scemode & R_VIEWPORT_PREVIEW)
return (ob->restrictflag & OB_RESTRICT_VIEW) != 0;
/* note: in rendered viewport, for now we always use render visibility rather than
* viewport visibility, because using viewport visibility can cause some problems.
* for example, mesh deform cage is drawn as a solid/textured mesh (not a wireframe
* mesh) and its unnecessary surfaces and shadows mess up the preview. we need more
* discussion about the way to take viewport visibility into account. */
return (ob->restrictflag & OB_RESTRICT_RENDER) != 0;
else
return (ob->restrictflag & OB_RESTRICT_RENDER) != 0;
}