[Bf-blender-cvs] [5cee409] master: Followup fix to T39966.
Lukas Tönne
noreply at git.blender.org
Tue May 6 17:54:10 CEST 2014
Commit: 5cee409d42ff33ce4f3d7fa98655867b2c84b701
Author: Lukas Tönne
Date: Tue May 6 17:44:43 2014 +0200
https://developer.blender.org/rB5cee409d42ff33ce4f3d7fa98655867b2c84b701
Followup fix to T39966.
The previous fix was not quite correct:
* It would use the same wireframe/bbox check in viewport- and regular render
* The duplicator loop in Blender Internal is more permissive now to avoid disabling wireframe duplicators, but this means we need to check is_object_hidden right before making render objects to ensure this still works.
===================================================================
M source/blender/render/intern/source/convertblender.c
===================================================================
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index dfd0531..18c9434 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -3924,10 +3924,15 @@ static bool is_object_hidden(Render *re, Object *ob)
if (is_object_restricted(re, ob))
return true;
- /* 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.
- */
- return ELEM(ob->dt, OB_BOUNDBOX, OB_WIRE);
+ if (re->r.scemode & R_VIEWPORT_PREVIEW) {
+ /* 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.
+ */
+ return ELEM(ob->dt, OB_BOUNDBOX, OB_WIRE);
+ }
+ else {
+ return false;
+ }
}
/* layflag: allows material group to ignore layerflag */
@@ -4795,6 +4800,9 @@ void RE_Database_Free(Render *re)
static int allow_render_object(Render *re, Object *ob, int nolamps, int onlyselected, Object *actob)
{
+ if (is_object_hidden(re, ob))
+ return 0;
+
/* override not showing object when duplis are used with particles */
if (ob->transflag & OB_DUPLIPARTS) {
/* pass */ /* let particle system(s) handle showing vs. not showing */
More information about the Bf-blender-cvs
mailing list