Fix T43019: Child of objectes used by duplis are visible in Cycles

Seems the parent check didn't go deep enough and only checked single parent.
Now it checks the chain of parents which seems to be correct but requires
much more intense testing.
This commit is contained in:
Sergey Sharybin 2014-12-26 13:34:48 +05:00
parent 53ec177b7f
commit 836ea4b70f
Notes: blender-bot 2023-02-14 10:32:59 +01:00
Referenced by issue #43019, Procedural Duplication (Dupliverts etc) master object's children are being rendered.
1 changed files with 11 additions and 3 deletions

View File

@ -414,9 +414,17 @@ static bool object_render_hide(BL::Object b_ob, bool top_level, bool parent_hide
/* hide original object for duplis */
BL::Object parent = b_ob.parent();
if(parent && object_render_hide_original(b_ob.type(), parent.dupli_type()))
if(parent_hide)
hide_as_dupli_child_original = true;
while(parent) {
if(object_render_hide_original(b_ob.type(),
parent.dupli_type()))
{
if(parent_hide) {
hide_as_dupli_child_original = true;
break;
}
}
parent = parent.parent();
}
hide_triangles = hide_emitter;