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:
-rw-r--r--intern/cycles/blender/blender_util.h2
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c16
-rw-r--r--source/blender/makesdna/DNA_object_types.h2
3 files changed, 14 insertions, 6 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index d5dbaba094b..e79f2bbb27d 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -698,7 +698,7 @@ protected:
/* Object Key */
-enum { OBJECT_PERSISTENT_ID_SIZE = 8 };
+enum { OBJECT_PERSISTENT_ID_SIZE = 16 };
struct ObjectKey {
void *parent;
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 21a0246353e..3a0222b1c4b 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -221,31 +221,39 @@ static void make_child_duplis(const DupliContext *ctx, void *userdata, MakeChild
if (ctx->group) {
unsigned int lay = ctx->group->layer;
+ unsigned int groupid = 0;
GroupObject *go;
- for (go = ctx->group->gobject.first; go; go = go->next) {
+ for (go = ctx->group->gobject.first; go; go = go->next, groupid++) {
Object *ob = go->ob;
if ((ob->lay & lay) && ob != obedit && is_child(ob, parent)) {
+ DupliContext pctx;
+ copy_dupli_context(&pctx, ctx, ctx->object, NULL, groupid, false);
+
/* mballs have a different dupli handling */
if (ob->type != OB_MBALL)
ob->flag |= OB_DONE; /* doesnt render */
- make_child_duplis_cb(ctx, userdata, ob);
+ make_child_duplis_cb(&pctx, userdata, ob);
}
}
}
else {
unsigned int lay = ctx->scene->lay;
+ unsigned int baseid = 0;
Base *base;
- for (base = ctx->scene->base.first; base; base = base->next) {
+ for (base = ctx->scene->base.first; base; base = base->next, baseid++) {
Object *ob = base->object;
if ((base->lay & lay) && ob != obedit && is_child(ob, parent)) {
+ DupliContext pctx;
+ copy_dupli_context(&pctx, ctx, ctx->object, NULL, baseid, false);
+
/* mballs have a different dupli handling */
if (ob->type != OB_MBALL)
ob->flag |= OB_DONE; /* doesnt render */
- make_child_duplis_cb(ctx, userdata, ob);
+ make_child_duplis_cb(&pctx, userdata, ob);
}
}
}
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index d53c8360bb5..d24c7faa9f5 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -331,7 +331,7 @@ typedef struct DupliObject {
/* persistent identifier for a dupli object, for inter-frame matching of
* objects with motion blur, or inter-update matching for syncing */
- int persistent_id[8]; /* MAX_DUPLI_RECUR */
+ int persistent_id[16]; /* 2*MAX_DUPLI_RECUR */
/* particle this dupli was generated from */
struct ParticleSystem *particle_system;