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:
authorCampbell Barton <ideasman42@gmail.com>2014-05-07 11:11:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-07 11:11:33 +0400
commit5e55fc21b78a9a6070b951bccf10a539b06f8e97 (patch)
tree3e1b986b85f698dc95f929a832e4ddbf2f95b709 /source/blender/blenkernel/intern/object_dupli.c
parentdcabd3f81fd278c6029764df415b1257402c07ad (diff)
Fix T40051: Inconsistent dupli vert/face handling of group member types
Diffstat (limited to 'source/blender/blenkernel/intern/object_dupli.c')
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 30e2cc253a4..84e626a3104 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -301,6 +301,18 @@ static void make_duplis_group(const DupliContext *ctx)
if (go->ob != ob) {
float mat[4][4];
+ /* Special case for instancing dupli-groups, see: T40051
+ * this object may be instanced via dupli-verts/faces, in this case we don't want to render
+ * (blender convention), but _do_ show in the viewport.
+ *
+ * Regular objects work fine but not if we're instancing dupli-groups,
+ * because the rules for rendering aren't applied to objects they instance.
+ * We could recursively pass down the 'hide' flag instead, but that seems unnecessary.
+ */
+ if (for_render && go->ob->parent && go->ob->parent->transflag & (OB_DUPLIVERTS | OB_DUPLIFACES)) {
+ continue;
+ }
+
/* group dupli offset, should apply after everything else */
mul_m4_m4m4(mat, group_mat, go->ob->obmat);