Bugfix #27504
authorTon Roosendaal <ton@blender.org>
Sun, 21 Oct 2012 13:30:18 +0000 (13:30 +0000)
committerTon Roosendaal <ton@blender.org>
Sun, 21 Oct 2012 13:30:18 +0000 (13:30 +0000)
Render error.
Particle systems that duplicate group instances were setting the wrong
layer to the instanced objects, the correct layer is the particle system
itself - as being shown in the viewport correctly already.

Old report from May 2011 :)

source/blender/render/intern/source/convertblender.c

index ea3673c28f8b574f19613cb40d86ef89a0339300..f1e8d532cda5374c085f8c11c0961818aae8734b 100644 (file)
@@ -4935,7 +4935,8 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
                                                 * a dupligroup that has already been created before */
                                                if (dob->type != OB_DUPLIGROUP || (obr=find_dupligroup_dupli(re, obd, 0))) {
                                                        mult_m4_m4m4(mat, re->viewmat, dob->mat);
-                                                       obi= RE_addRenderInstance(re, NULL, obd, ob, dob->index, 0, mat, obd->lay);
+                                                                                                               /* ob = particle system, use that layer */
+                                                       obi= RE_addRenderInstance(re, NULL, obd, ob, dob->index, 0, mat, ob->lay); 
 
                                                        /* fill in instance variables for texturing */
                                                        set_dupli_tex_mat(re, obi, dob);