diff options
author | IRIE Shinsuke <irieshinsuke@yahoo.co.jp> | 2014-03-12 21:50:01 +0400 |
---|---|---|
committer | IRIE Shinsuke <irieshinsuke@yahoo.co.jp> | 2014-03-12 22:46:44 +0400 |
commit | fbf859518acfa8aabbb908447d5d96640c328ea2 (patch) | |
tree | 7f5fba3555d080123d61a0a0a259f6350341ecf9 /source | |
parent | d7cff8f74c00e6952c9f69e5f673f2b68045ef3e (diff) |
Followup for fix T38318: Add back previous fix and fix a glitch.
The previous fix 162d6c73e3d0 has been cancelled because it caused a
problem that mesh deform cages and so on mess up the preview. To avoid
the problem, viewport doesn't show mesh object if its draw type is
bounding box or wireframe.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D375
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/convertblender.c | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 8a2d412ff56..b46b1e71c32 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -2646,7 +2646,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "dt"); RNA_def_property_enum_items(prop, drawtype_items); RNA_def_property_ui_text(prop, "Maximum Draw Type", "Maximum draw type to display object with in viewport"); - RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); prop = RNA_def_property(srna, "show_bounds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWBOUNDOX); diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 833acb68a7c..53845b91c75 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -3929,12 +3929,7 @@ 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) - /* 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; + return (ob->restrictflag & OB_RESTRICT_VIEW) != 0 || ELEM(ob->dt, OB_BOUNDBOX, OB_WIRE); else return (ob->restrictflag & OB_RESTRICT_RENDER) != 0; } |