mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Followup for fix T38318: Add back previous fix and fix a glitch.
The previous fix 162d6c73e3 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
This commit is contained in:
parent
d7cff8f74c
commit
fbf859518a
2 changed files with 2 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue