diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-11 17:55:00 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-11 17:55:00 +0400 |
commit | 6ce92d09f77351b3ad882e8d8f6d6b1511e91844 (patch) | |
tree | 4868bde0df44902b8fdbadc4e92cf785e7c0e91f /intern | |
parent | 3376cd93fa8f430810841a6c554304cac4d90c7f (diff) |
Fix #29848: cycles not respecting dupli group visible layers, also exposed
DupliObject.hide property in API now.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index caf5b0a99b1..608cb33eadd 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -228,7 +228,12 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d) for(b_ob->dupli_list.begin(b_dup); b_dup != b_ob->dupli_list.end(); ++b_dup) { Transform tfm = get_transform(b_dup->matrix()); - sync_object(*b_ob, b_index, b_dup->object(), tfm, ob_layer); + BL::Object b_dup_ob = b_dup->object(); + bool dup_hide = (b_v3d)? b_dup_ob.hide(): b_dup_ob.hide_render(); + + if(!(b_dup->hide() || dup_hide)) + sync_object(*b_ob, b_index, b_dup_ob, tfm, ob_layer); + b_index++; } |