Fix T40142: Objects restricted in render/view don't produce duplis in
authorLukas Tönne <lukas.toenne@gmail.com>
Mon, 12 May 2014 06:55:47 +0000 (08:55 +0200)
committerLukas Tönne <lukas.toenne@gmail.com>
Mon, 12 May 2014 06:55:47 +0000 (08:55 +0200)
with correct transform for Blender Internal.

According to previous code the obmat must be modified even if the
duplicated object itself is filtered later. TBH i have no idea how/why
this works, but nobody else does either ... All obmats are restored
after BI messes with them during render, so should be fine ...

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

index 18c9434929fee4f7c2b9055a53bfaf40d3a3a901..cb5f75efd16fdf3936cf15855cbe448a265c84a0 100644 (file)
@@ -5007,6 +5007,8 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
                                        DupliExtraData *dob_extra = &duplilist_apply_data->extra[i];
                                        Object *obd= dob->ob;
 
+                                       copy_m4_m4(obd->obmat, dob->mat);
+
                                        /* group duplis need to set ob matrices correct, for deform. so no_draw is part handled */
                                        if (!(obd->transflag & OB_RENDER_DUPLI) && dob->no_draw)
                                                continue;
@@ -5020,8 +5022,6 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
                                        if (!allow_render_object(re, obd, nolamps, onlyselected, actob))
                                                continue;
 
-                                       copy_m4_m4(obd->obmat, dob->mat);
-
                                        if (allow_render_dupli_instance(re, dob, obd)) {
                                                ParticleSystem *psys;
                                                ObjectRen *obr = NULL;