Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-04-12 18:14:13 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-04-12 18:16:36 +0300
commit068ee2cd98fc987453cd50285c387c6480c6d99c (patch)
tree5ae8b7d3b4f7f12cafb3196aa9be133f7347fae6 /source/blender/blenkernel/intern/object_dupli.c
parent3a977ff50263738aef6f8ef30dc43977c49c82cc (diff)
Fix T47754: Meshes glitch on cycling Viewport Shading mode with Linked Groups
This is a regression since 4310128 which is cased by really bad logic: there might be dependencies between dupli-objects, which means _if_ we really want to ensure derived mesh on dupli creation we have to do it before any matrix is overwritten. I'm not sure if such derived mesh trick is really the only way to go without major refactor, but seems simple fix for now will do it.
Diffstat (limited to 'source/blender/blenkernel/intern/object_dupli.c')
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 7f742dee73c..63c37fddc60 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -1253,15 +1253,16 @@ DupliApplyData *duplilist_apply(Object *ob, Scene *scene, ListBase *duplilist)
"DupliObject apply extra data");
for (dob = duplilist->first, i = 0; dob; dob = dob->next, ++i) {
- /* copy obmat from duplis */
- copy_m4_m4(apply_data->extra[i].obmat, dob->ob->obmat);
-
/* make sure derivedmesh is calculated once, before drawing */
if (scene && !(dob->ob->transflag & OB_DUPLICALCDERIVED) && dob->ob->type == OB_MESH) {
mesh_get_derived_final(scene, dob->ob, scene->customdata_mask);
dob->ob->transflag |= OB_DUPLICALCDERIVED;
}
+ }
+ for (dob = duplilist->first, i = 0; dob; dob = dob->next, ++i) {
+ /* copy obmat from duplis */
+ copy_m4_m4(apply_data->extra[i].obmat, dob->ob->obmat);
copy_m4_m4(dob->ob->obmat, dob->mat);
/* copy layers from the main duplicator object */