[Bf-blender-cvs] [a6e3471] master: Fix T39136: DupliFaces: Inconsistent handling of group member types

Sergey Sharybin noreply at git.blender.org
Tue Mar 18 13:15:10 CET 2014


Commit: a6e347177bb61ce3d6e5657c1dfbd6ffa7663c55
Author: Sergey Sharybin
Date:   Tue Mar 18 18:05:59 2014 +0600
https://developer.blender.org/rBa6e347177bb61ce3d6e5657c1dfbd6ffa7663c55

Fix T39136: DupliFaces: Inconsistent handling of group member types

The issue was caused by assumption object matricies can be modified
by DupliObject->obmat outside of the duplilist iteration cycle.

This isn't really true. The thing is, old code used to modify object
matrix based on the duplicated matrix to make it so modifier evaluation
kind of works (it'll use proper matrix in most cases, but think there
might be some cases when this assumption also breaks).

Even when matrix is copied from dupliobject to object in advance
(to mimic old behavior or dupli system) you're still to use matrix
from dupliobject inside a cycle body. This is because the same object
might be modified multiple times by different dupliobject. For example,
in case of duplifaces loads of faces will modify object's matrix and
before this change matrix from the last face would have been used.

The fix is simple one-liner which makes it so render instance will
use proper matrix from dupliobject.

All the rest bits here (pre-loading matrices and restoring them in
the reverse order) totally matches old behavior of duplilist.

This is a regression and to be ported to 2.70 tag!

===================================================================

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

===================================================================

diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 53845b9..8fc8274 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -5031,6 +5031,8 @@ 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;




More information about the Bf-blender-cvs mailing list