Commit: 319b9d6501f2170dcf06b10de0add340d0be83a3
Author: Campbell Barton
Date:   Sun Feb 17 19:00:54 2019 +1100
Branches: master
https://developer.blender.org/rB319b9d6501f2170dcf06b10de0add340d0be83a3

DNA: rename dup_* struct members to instance_*

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

M       source/blender/blenkernel/intern/collection.c
M       source/blender/blenkernel/intern/collision.c
M       source/blender/blenkernel/intern/library_query.c
M       source/blender/blenkernel/intern/object.c
M       source/blender/blenkernel/intern/object_dupli.c
M       source/blender/blenkernel/intern/object_update.c
M       source/blender/blenkernel/intern/particle.c
M       source/blender/blenkernel/intern/pointcache.c
M       source/blender/blenkernel/intern/scene.c
M       source/blender/blenloader/intern/readfile.c
M       source/blender/blenloader/intern/versioning_legacy.c
M       source/blender/blenloader/intern/writefile.c
M       source/blender/collada/SceneExporter.cpp
M       source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M       source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M       source/blender/editors/object/object_add.c
M       source/blender/editors/object/object_relations.c
M       source/blender/editors/object/object_select.c
M       source/blender/editors/object/object_transform.c
M       source/blender/editors/physics/particle_object.c
M       source/blender/editors/space_outliner/outliner_collections.c
M       source/blender/editors/space_outliner/outliner_draw.c
M       source/blender/editors/space_outliner/outliner_tools.c
M       source/blender/editors/space_outliner/outliner_tree.c
M       source/blender/makesdna/DNA_object_types.h
M       source/blender/makesdna/DNA_particle_types.h
M       source/blender/makesdna/intern/dna_rename_defs.h
M       source/blender/makesrna/intern/rna_object.c
M       source/blender/makesrna/intern/rna_particle.c
M       source/blender/makesrna/intern/rna_scene.c

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

diff --git a/source/blender/blenkernel/intern/collection.c 
b/source/blender/blenkernel/intern/collection.c
index 2cbce902b94..41393d99db4 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -401,8 +401,8 @@ Collection *BKE_collection_master(const Scene *scene)
 
 static bool collection_object_cyclic_check_internal(Object *object, Collection 
*collection)
 {
-       if (object->dup_group) {
-               Collection *dup_collection = object->dup_group;
+       if (object->instance_collection) {
+               Collection *dup_collection = object->instance_collection;
                if ((dup_collection->id.tag & LIB_TAG_DOIT) == 0) {
                        /* Cycle already exists in collections, let's prevent 
further crappyness */
                        return true;
@@ -483,9 +483,9 @@ bool BKE_collection_is_empty(Collection *collection)
 
 static bool collection_object_add(Main *bmain, Collection *collection, Object 
*ob, int flag, const bool add_us)
 {
-       if (ob->dup_group) {
+       if (ob->instance_collection) {
                /* Cyclic dependency check. */
-               if (collection_find_child_recursive(ob->dup_group, collection)) 
{
+               if (collection_find_child_recursive(ob->instance_collection, 
collection)) {
                        return false;
                }
        }
diff --git a/source/blender/blenkernel/intern/collision.c 
b/source/blender/blenkernel/intern/collision.c
index 8fd8285c433..f914441aa59 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -921,8 +921,8 @@ static void add_collision_object(ListBase *relations, 
Object *ob, int level, uns
        /* objects in dupli groups, one level only for now */
        /* TODO: this doesn't really work, we are not taking into account the
         * dupli transforms and can get objects in the list multiple times. */
-       if (ob->dup_group && level == 0) {
-               Collection *collection= ob->dup_group;
+       if (ob->instance_collection && level == 0) {
+               Collection *collection= ob->instance_collection;
 
                /* add objects */
                FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(collection, object)
diff --git a/source/blender/blenkernel/intern/library_query.c 
b/source/blender/blenkernel/intern/library_query.c
index 29e0ee0715d..92633803895 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -560,7 +560,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, 
LibraryIDLinkCallback call
                                data.cb_flag = data_cb_flag;
 
                                CALLBACK_INVOKE(object->gpd, IDWALK_CB_USER);
-                               CALLBACK_INVOKE(object->dup_group, 
IDWALK_CB_USER);
+                               CALLBACK_INVOKE(object->instance_collection, 
IDWALK_CB_USER);
 
                                if (object->pd) {
                                        CALLBACK_INVOKE(object->pd->tex, 
IDWALK_CB_USER);
@@ -812,8 +812,8 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, 
LibraryIDLinkCallback call
                        case ID_PA:
                        {
                                ParticleSettings *psett = (ParticleSettings *) 
id;
-                               CALLBACK_INVOKE(psett->dup_group, 
IDWALK_CB_USER);
-                               CALLBACK_INVOKE(psett->dup_ob, IDWALK_CB_NOP);
+                               CALLBACK_INVOKE(psett->instance_collection, 
IDWALK_CB_USER);
+                               CALLBACK_INVOKE(psett->instance_object, 
IDWALK_CB_NOP);
                                CALLBACK_INVOKE(psett->bb_ob, IDWALK_CB_NOP);
                                CALLBACK_INVOKE(psett->collision_group, 
IDWALK_CB_NOP);
 
@@ -854,7 +854,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, 
LibraryIDLinkCallback call
                                        }
                                }
 
-                               for (ParticleDupliWeight *dw = 
psett->dupliweights.first; dw; dw = dw->next) {
+                               for (ParticleDupliWeight *dw = 
psett->instance_weights.first; dw; dw = dw->next) {
                                        CALLBACK_INVOKE(dw->ob, IDWALK_CB_NOP);
                                }
                                break;
diff --git a/source/blender/blenkernel/intern/object.c 
b/source/blender/blenkernel/intern/object.c
index a2bf36bc660..5f4a64e502e 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -852,7 +852,7 @@ void BKE_object_init(Object *ob)
                ob->upflag = OB_POSZ;
        }
 
-       ob->dupfacesca = 1.0;
+       ob->instance_faces_scale = 1.0;
 
        ob->col_group = 0x01;
        ob->col_mask = 0xffff;
@@ -1576,9 +1576,9 @@ void BKE_object_make_proxy(Main *bmain, Object *ob, 
Object *target, Object *cob)
        if (cob) {
                ob->rotmode = target->rotmode;
                mul_m4_m4m4(ob->obmat, cob->obmat, target->obmat);
-               if (cob->dup_group) { /* should always be true */
+               if (cob->instance_collection) { /* should always be true */
                        float tvec[3];
-                       mul_v3_mat3_m4v3(tvec, ob->obmat, 
cob->dup_group->dupli_ofs);
+                       mul_v3_mat3_m4v3(tvec, ob->obmat, 
cob->instance_collection->dupli_ofs);
                        sub_v3_v3(ob->obmat[3], tvec);
                }
                BKE_object_apply_mat4(ob, ob->obmat, false, true);
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 */
diff --git a/source/blender/blenkernel/intern/object_update.c 
b/source/blender/blenkernel/intern/object_update.c
index f41789f6a1d..c6b66f2456f 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -226,8 +226,8 @@ void BKE_object_handle_data_update(
                        if (psys_check_enabled(ob, psys, use_render_params)) {
                                /* check use of dupli objects here */
                                if (psys->part && (psys->part->draw_as == 
PART_DRAW_REND || u

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to