diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-17 11:00:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-17 11:00:54 +0300 |
commit | 319b9d6501f2170dcf06b10de0add340d0be83a3 (patch) | |
tree | d43beea169beef1fae3c2f253e4aab7fc116bad8 /source/blender/blenkernel/intern/object_dupli.c | |
parent | 19a703b0db1687aac2e887f32b225e897a3fac88 (diff) |
DNA: rename dup_* struct members to instance_*
Diffstat (limited to 'source/blender/blenkernel/intern/object_dupli.c')
-rw-r--r-- | source/blender/blenkernel/intern/object_dupli.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c index db6855ccaf3..8a70faf69ec 100644 --- a/source/blender/blenkernel/intern/object_dupli.c +++ b/source/blender/blenkernel/intern/object_dupli.c @@ -119,7 +119,7 @@ static void copy_dupli_context(DupliContext *r_ctx, const DupliContext *ctx, Obj /* XXX annoying, previously was done by passing an ID* argument, this at least is more explicit */ if (ctx->gen->type == OB_DUPLICOLLECTION) - r_ctx->collection = ctx->object->dup_group; + r_ctx->collection = ctx->object->instance_collection; r_ctx->object = ob; if (mat) @@ -270,8 +270,8 @@ static void make_duplis_collection(const DupliContext *ctx) Collection *collection; float collection_mat[4][4]; - if (ob->dup_group == NULL) return; - collection = ob->dup_group; + if (ob->instance_collection == NULL) return; + collection = ob->instance_collection; /* combine collection offset and obmat */ unit_m4(collection_mat); @@ -614,7 +614,7 @@ static void make_child_duplis_faces(const DupliContext *ctx, void *userdata, Obj continue; /* obmat is transform to face */ - get_dupliface_transform(mp, loopstart, mvert, fdd->use_scale, ctx->object->dupfacesca, obmat); + get_dupliface_transform(mp, loopstart, mvert, fdd->use_scale, ctx->object->instance_faces_scale, obmat); /* make offset relative to inst_ob using relative child transform */ mul_mat3_m4_v3(child_imat, obmat[3]); @@ -767,14 +767,14 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem /* first check for loops (particle system object used as dupli object) */ if (part->ren_as == PART_DRAW_OB) { - if (ELEM(part->dup_ob, NULL, par)) + if (ELEM(part->instance_object, NULL, par)) return; } else { /*PART_DRAW_GR */ - if (part->dup_group == NULL) + if (part->instance_collection == NULL) return; - const ListBase dup_collection_objects = BKE_collection_object_cache_get(part->dup_group); + const ListBase dup_collection_objects = BKE_collection_object_cache_get(part->instance_collection); if (BLI_listbase_is_empty(&dup_collection_objects)) return; @@ -806,8 +806,8 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem if (part->draw & PART_DRAW_COUNT_GR) { psys_find_group_weights(part); - for (dw = part->dupliweights.first; dw; dw = dw->next) { - FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->dup_group, object, mode) + for (dw = part->instance_weights.first; dw; dw = dw->next) { + FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->instance_collection, object, mode) { if (dw->ob == object) { totcollection += dw->count; @@ -818,7 +818,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem } } else { - FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->dup_group, object, mode) + FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->instance_collection, object, mode) { (void) object; totcollection++; @@ -830,8 +830,8 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem if (part->draw & PART_DRAW_COUNT_GR) { a = 0; - for (dw = part->dupliweights.first; dw; dw = dw->next) { - FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->dup_group, object, mode) + for (dw = part->instance_weights.first; dw; dw = dw->next) { + FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->instance_collection, object, mode) { if (dw->ob == object) { for (b = 0; b < dw->count; b++, a++) { @@ -845,7 +845,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem } else { a = 0; - FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->dup_group, object, mode) + FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->instance_collection, object, mode) { oblist[a] = object; a++; @@ -854,7 +854,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem } } else { - ob = part->dup_ob; + ob = part->instance_object; } if (totchild == 0 || part->draw & PART_DRAW_PARENT) @@ -933,7 +933,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem if (part->ren_as == PART_DRAW_GR && psys->part->draw & PART_DRAW_WHOLE_GR) { b = 0; - FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->dup_group, object, mode) + FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(part->instance_collection, object, mode) { copy_m4_m4(tmat, oblist[b]->obmat); @@ -942,8 +942,8 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem mul_v3_fl(tmat[3], size * scale); /* collection dupli offset, should apply after everything else */ - if (!is_zero_v3(part->dup_group->dupli_ofs)) { - sub_v3_v3(tmat[3], part->dup_group->dupli_ofs); + if (!is_zero_v3(part->instance_collection->dupli_ofs)) { + sub_v3_v3(tmat[3], part->instance_collection->dupli_ofs); } /* individual particle transform */ |