Fix #31780, cycles nested group rendering broken. Was using the dupli object 'index...
authorLukas Toenne <lukas.toenne@googlemail.com>
Wed, 13 Jun 2012 08:10:59 +0000 (08:10 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Wed, 13 Jun 2012 08:10:59 +0000 (08:10 +0000)
intern/cycles/blender/blender_object.cpp

index c4b58d6fa761c5ffa6642a01397d70b45366d2a8..9c98cacc9b8eb6d752fa9c75b99b316414dd8afa 100644 (file)
@@ -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);