diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-13 12:10:59 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-13 12:10:59 +0400 |
commit | f73d5f2c446083928553dd6d16b2104657917a88 (patch) | |
tree | c9c72c3440f54b7a3e7c122f2e931ad97cd475f9 /intern | |
parent | 1a625d1416e5caaaa21a2dcc1fb00e66a1911758 (diff) |
Fix #31780, cycles nested group rendering broken. Was using the dupli object 'index' member to identify dupli objects, but this is not unique and in fact just 0 in most cases. Needs to use a simple dupli list counter instead.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index c4b58d6fa76..9c98cacc9b8 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -317,14 +317,18 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, int motion) object_create_duplilist(*b_ob, b_scene); BL::Object::dupli_list_iterator b_dup; + int b_index = 0; + for(b_ob->dupli_list.begin(b_dup); b_dup != b_ob->dupli_list.end(); ++b_dup) { Transform tfm = get_transform(b_dup->matrix()); 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_dup->index(), b_dup_ob, tfm, ob_layer, motion, b_dup->particle_index() + particle_offset); + sync_object(*b_ob, b_index, b_dup_ob, tfm, ob_layer, motion, b_dup->particle_index() + particle_offset); } + + ++b_index; } object_free_duplilist(*b_ob); |