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>2019-02-17 11:00:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-17 11:00:54 +0300
commit319b9d6501f2170dcf06b10de0add340d0be83a3 (patch)
treed43beea169beef1fae3c2f253e4aab7fc116bad8 /source/blender/editors
parent19a703b0db1687aac2e887f32b225e897a3fac88 (diff)
DNA: rename dup_* struct members to instance_*
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_add.c4
-rw-r--r--source/blender/editors/object/object_relations.c32
-rw-r--r--source/blender/editors/object/object_select.c12
-rw-r--r--source/blender/editors/object/object_transform.c14
-rw-r--r--source/blender/editors/physics/particle_object.c22
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c4
9 files changed, 47 insertions, 47 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index a6360ac2e38..baa94806082 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1216,7 +1216,7 @@ static int collection_instance_add_exec(bContext *C, wmOperator *op)
}
Object *ob = ED_object_add_type(C, OB_EMPTY, collection->id.name + 2, loc, rot, false, local_view_bits);
- ob->dup_group = collection;
+ ob->instance_collection = collection;
ob->transflag |= OB_DUPLICOLLECTION;
id_us_plus(&collection->id);
@@ -1685,7 +1685,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
}
}
- if (base->object->transflag & OB_DUPLICOLLECTION && base->object->dup_group) {
+ if (base->object->transflag & OB_DUPLICOLLECTION && base->object->instance_collection) {
for (Object *ob = bmain->object.first; ob; ob = ob->id.next) {
if (ob->proxy_group == base->object) {
ob->proxy = NULL;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 00b32f6130d..ff3fda90495 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -297,9 +297,9 @@ static int make_proxy_invoke(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_CANCELLED;
/* Get object to work on - use a menu if we need to... */
- if (ob->dup_group && ID_IS_LINKED(ob->dup_group)) {
+ if (ob->instance_collection && ID_IS_LINKED(ob->instance_collection)) {
/* gives menu with list of objects in group */
- /* proxy_group_objects_menu(C, op, ob, ob->dup_group); */
+ /* proxy_group_objects_menu(C, op, ob, ob->instance_collection); */
WM_enum_search_invoke(C, op, event);
return OPERATOR_CANCELLED;
}
@@ -333,9 +333,9 @@ static int make_proxy_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
- if (gob->dup_group != NULL) {
- const ListBase dup_group_objects = BKE_collection_object_cache_get(gob->dup_group);
- Base *base = BLI_findlink(&dup_group_objects, RNA_enum_get(op->ptr, "object"));
+ if (gob->instance_collection != NULL) {
+ const ListBase instance_collection_objects = BKE_collection_object_cache_get(gob->instance_collection);
+ Base *base = BLI_findlink(&instance_collection_objects, RNA_enum_get(op->ptr, "object"));
ob = base->object;
}
else {
@@ -386,11 +386,11 @@ static const EnumPropertyItem *proxy_collection_object_itemf(
int i = 0;
Object *ob = ED_object_active_context(C);
- if (!ob || !ob->dup_group)
+ if (!ob || !ob->instance_collection)
return DummyRNA_DEFAULT_items;
/* find the object to affect */
- FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(ob->dup_group, object)
+ FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(ob->instance_collection, object)
{
item_tmp.identifier = item_tmp.name = object->id.name + 2;
item_tmp.value = i++;
@@ -1433,7 +1433,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
/* now add in the collections from the link nodes */
for (collection_node = ob_collections; collection_node; collection_node = collection_node->next) {
- if (ob_dst->dup_group != collection_node->link) {
+ if (ob_dst->instance_collection != collection_node->link) {
BKE_collection_object_add(bmain, collection_node->link, ob_dst);
}
else {
@@ -1443,9 +1443,9 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
break;
}
case MAKE_LINKS_DUPLICOLLECTION:
- ob_dst->dup_group = ob_src->dup_group;
- if (ob_dst->dup_group) {
- id_us_plus(&ob_dst->dup_group->id);
+ ob_dst->instance_collection = ob_src->instance_collection;
+ if (ob_dst->instance_collection) {
+ id_us_plus(&ob_dst->instance_collection->id);
ob_dst->transflag |= OB_DUPLICOLLECTION;
}
break;
@@ -2200,7 +2200,7 @@ static int make_override_static_invoke(bContext *C, wmOperator *op, const wmEven
}
/* Get object to work on - use a menu if we need to... */
- if (!ID_IS_LINKED(obact) && obact->dup_group != NULL && ID_IS_LINKED(obact->dup_group)) {
+ if (!ID_IS_LINKED(obact) && obact->instance_collection != NULL && ID_IS_LINKED(obact->instance_collection)) {
/* Gives menu with list of objects in group. */
WM_enum_search_invoke(C, op, event);
return OPERATOR_CANCELLED;
@@ -2235,9 +2235,9 @@ static int make_override_static_exec(bContext *C, wmOperator *op)
bool success = false;
- if (!ID_IS_LINKED(obact) && obact->dup_group != NULL && ID_IS_LINKED(obact->dup_group)) {
+ if (!ID_IS_LINKED(obact) && obact->instance_collection != NULL && ID_IS_LINKED(obact->instance_collection)) {
Object *obcollection = obact;
- Collection *collection = obcollection->dup_group;
+ Collection *collection = obcollection->instance_collection;
const ListBase dup_collection_objects = BKE_collection_object_cache_get(collection);
Base *base = BLI_findlink(&dup_collection_objects, RNA_enum_get(op->ptr, "object"));
@@ -2302,7 +2302,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op)
/* obcollection is no more duplicollection-ing,
* it merely parents whole collection of overriding instantiated objects. */
- obcollection->dup_group = NULL;
+ obcollection->instance_collection = NULL;
/* Also, we'd likely want to lock by default things like
* transformations of implicitly overridden objects? */
@@ -2350,7 +2350,7 @@ static bool make_override_static_poll(bContext *C)
return (BKE_override_static_is_enabled() &&
ED_operator_objectmode(C) && obact != NULL &&
((ID_IS_LINKED(obact) && obact->id.tag & LIB_TAG_EXTERN) ||
- (!ID_IS_LINKED(obact) && obact->dup_group != NULL && ID_IS_LINKED(obact->dup_group))));
+ (!ID_IS_LINKED(obact) && obact->instance_collection != NULL && ID_IS_LINKED(obact->instance_collection))));
}
void OBJECT_OT_make_override_static(wmOperatorType *ot)
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 0ae04ab9b33..24660896fae 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -500,16 +500,16 @@ static bool object_select_all_by_material(bContext *C, Material *mat)
return changed;
}
-static bool object_select_all_by_dup_group(bContext *C, Object *ob)
+static bool object_select_all_by_instance_collection(bContext *C, Object *ob)
{
bool changed = false;
- Collection *dup_group = (ob->transflag & OB_DUPLICOLLECTION) ? ob->dup_group : NULL;
+ Collection *instance_collection = (ob->transflag & OB_DUPLICOLLECTION) ? ob->instance_collection : NULL;
CTX_DATA_BEGIN (C, Base *, base, visible_bases)
{
if (((base->flag & BASE_SELECTED) == 0) && ((base->flag & BASE_SELECTABLE) != 0)) {
- Collection *dup_group_other = (base->object->transflag & OB_DUPLICOLLECTION) ? base->object->dup_group : NULL;
- if (dup_group == dup_group_other) {
+ Collection *instance_collection_other = (base->object->transflag & OB_DUPLICOLLECTION) ? base->object->instance_collection : NULL;
+ if (instance_collection == instance_collection_other) {
ED_object_base_select(base, BA_SELECT);
changed = true;
}
@@ -649,10 +649,10 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
changed = object_select_all_by_material(C, mat);
}
else if (nr == OBJECT_SELECT_LINKED_DUPGROUP) {
- if (ob->dup_group == NULL)
+ if (ob->instance_collection == NULL)
return OPERATOR_CANCELLED;
- changed = object_select_all_by_dup_group(C, ob);
+ changed = object_select_all_by_instance_collection(C, ob);
}
else if (nr == OBJECT_SELECT_LINKED_PARTICLE) {
if (BLI_listbase_is_empty(&ob->particlesystem))
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 4fd03d213bc..a9157cfca2b 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -903,8 +903,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
for (tob = bmain->object.first; tob; tob = tob->id.next) {
if (tob->data)
((ID *)tob->data)->tag &= ~LIB_TAG_DOIT;
- if (tob->dup_group)
- ((ID *)tob->dup_group)->tag &= ~LIB_TAG_DOIT;
+ if (tob->instance_collection)
+ ((ID *)tob->instance_collection)->tag &= ~LIB_TAG_DOIT;
}
for (ctx_ob = ctx_data_list.first;
@@ -925,8 +925,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if (ob->data == NULL) {
/* special support for dupligroups */
- if ((ob->transflag & OB_DUPLICOLLECTION) && ob->dup_group && (ob->dup_group->id.tag & LIB_TAG_DOIT) == 0) {
- if (ID_IS_LINKED(ob->dup_group)) {
+ if ((ob->transflag & OB_DUPLICOLLECTION) && ob->instance_collection && (ob->instance_collection->id.tag & LIB_TAG_DOIT) == 0) {
+ if (ID_IS_LINKED(ob->instance_collection)) {
tot_lib_error++;
}
else {
@@ -943,10 +943,10 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
mul_m4_v3(ob->imat, cent);
}
- add_v3_v3(ob->dup_group->dupli_ofs, cent);
+ add_v3_v3(ob->instance_collection->dupli_ofs, cent);
tot_change++;
- ob->dup_group->id.tag |= LIB_TAG_DOIT;
+ ob->instance_collection->id.tag |= LIB_TAG_DOIT;
do_inverse_offset = true;
}
}
@@ -1197,7 +1197,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if ((ob_other->flag & OB_DONE) == 0 &&
((ob->data && (ob->data == ob_other->data)) ||
- (ob->dup_group == ob_other->dup_group &&
+ (ob->instance_collection == ob_other->instance_collection &&
(ob->transflag | ob_other->transflag) & OB_DUPLICOLLECTION)))
{
ob_other->flag |= OB_DONE;
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 3eea125f91c..291be49ea63 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -422,10 +422,10 @@ static int dupliob_move_up_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
part = psys->part;
- for (dw = part->dupliweights.first; dw; dw = dw->next) {
+ for (dw = part->instance_weights.first; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT && dw->prev) {
- BLI_remlink(&part->dupliweights, dw);
- BLI_insertlinkbefore(&part->dupliweights, dw->prev, dw);
+ BLI_remlink(&part->instance_weights, dw);
+ BLI_insertlinkbefore(&part->instance_weights, dw->prev, dw);
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
@@ -460,12 +460,12 @@ static int copy_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
if (!psys)
return OPERATOR_CANCELLED;
part = psys->part;
- for (dw = part->dupliweights.first; dw; dw = dw->next) {
+ for (dw = part->instance_weights.first; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT) {
dw->flag &= ~PART_DUPLIW_CURRENT;
dw = MEM_dupallocN(dw);
dw->flag |= PART_DUPLIW_CURRENT;
- BLI_addhead(&part->dupliweights, dw);
+ BLI_addhead(&part->instance_weights, dw);
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
@@ -501,15 +501,15 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
part = psys->part;
- for (dw = part->dupliweights.first; dw; dw = dw->next) {
+ for (dw = part->instance_weights.first; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT) {
- BLI_remlink(&part->dupliweights, dw);
+ BLI_remlink(&part->instance_weights, dw);
MEM_freeN(dw);
break;
}
}
- dw = part->dupliweights.last;
+ dw = part->instance_weights.last;
if (dw)
dw->flag |= PART_DUPLIW_CURRENT;
@@ -547,10 +547,10 @@ static int dupliob_move_down_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
part = psys->part;
- for (dw = part->dupliweights.first; dw; dw = dw->next) {
+ for (dw = part->instance_weights.first; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT && dw->next) {
- BLI_remlink(&part->dupliweights, dw);
- BLI_insertlinkafter(&part->dupliweights, dw->next, dw);
+ BLI_remlink(&part->instance_weights, dw);
+ BLI_insertlinkafter(&part->instance_weights, dw->next, dw);
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index e71e518c2c7..9349e2b6a56 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -562,7 +562,7 @@ static int collection_instance_exec(bContext *C, wmOperator *UNUSED(op))
GSET_ITER(collections_to_edit_iter, data.collections_to_edit) {
Collection *collection = BLI_gsetIterator_getKey(&collections_to_edit_iter);
Object *ob = ED_object_add_type(C, OB_EMPTY, collection->id.name + 2, scene->cursor.location, NULL, false, 0);
- ob->dup_group = collection;
+ ob->instance_collection = collection;
ob->transflag |= OB_DUPLICOLLECTION;
id_lib_extern(&collection->id);
}
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index d75a11a98c6..2c43bcd5639 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1304,7 +1304,7 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
case OB_LIGHTPROBE:
data.icon = ICON_OUTLINER_OB_LIGHTPROBE; break;
case OB_EMPTY:
- if (ob->dup_group) {
+ if (ob->instance_collection) {
data.icon = ICON_OUTLINER_OB_GROUP_INSTANCE;
}
else if (ob->empty_drawtype == OB_EMPTY_IMAGE) {
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index f14294d06e1..651f81de792 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -220,7 +220,7 @@ static void unlink_collection_cb(
if (tsep) {
if (GS(tsep->id->name) == ID_OB) {
Object *ob = (Object *)tsep->id;
- ob->dup_group = NULL;
+ ob->instance_collection = NULL;
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
DEG_relations_tag_update(bmain);
}
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 12e2a9b8d80..f1bf15bbd0c 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -478,8 +478,8 @@ static void outliner_add_object_contents(SpaceOutliner *soops, TreeElement *te,
}
/* duplicated group */
- if (ob->dup_group)
- outliner_add_element(soops, &te->subtree, ob->dup_group, te, 0, 0);
+ if (ob->instance_collection)
+ outliner_add_element(soops, &te->subtree, ob->instance_collection, te, 0, 0);
}