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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-02-01 16:08:18 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-02-01 16:08:18 +0300
commitb8bb15f744ea811f3ff14882fdd012a378fbbc97 (patch)
tree60eb534c9c3a3df6c4978960504c2e4035533e7c /source/blender
parent73b4cb5c8941495b7956912a6d1f8f5ee4734175 (diff)
Finalize/enable new static override for linked groups.
Behavior is expected to be simillar to 'make proxy' on linked groups, it basically allows you to select which object in the group will be to 'root' override (usually, the armature), checks which other objects needs to be overridden as well, overrides the group itself too, and instantiates the group and the root overridden object. It seems to be working, though handling of armature deformation is kind of totally broken in blender2.8 currently (modifiers...). ;)
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/object/object_relations.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 589b54cd3c0..43d29b6f931 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2411,7 +2411,6 @@ 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 0 /* Not working yet! */
Base *base = BLI_findlink(&obact->dup_group->view_layer->object_bases, RNA_enum_get(op->ptr, "object"));
Object *obgroup = obact;
obact = base->object;
@@ -2424,7 +2423,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op)
FOREACH_GROUP_OBJECT(obgroup->dup_group, ob)
{
- make_override_tag_object(obact, ob);
+ make_override_static_tag_object(obact, ob);
}
FOREACH_GROUP_OBJECT_END;
@@ -2435,7 +2434,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op)
ViewLayer *view_layer = CTX_data_view_layer(C);
Object *new_obact = (Object *)obact->id.newid;
if (new_obact != NULL && (base = BKE_view_layer_base_find(view_layer, new_obact)) == NULL) {
- BKE_collection_object_add_from(scene, obact, new_obact);
+ BKE_collection_object_add_from(scene, obgroup, new_obact);
base = BKE_view_layer_base_find(view_layer, new_obact);
BKE_view_layer_base_select(view_layer, base);
}
@@ -2453,9 +2452,6 @@ static int make_override_static_exec(bContext *C, wmOperator *op)
/* Cleanup. */
BKE_main_id_clear_newpoins(bmain);
BKE_main_id_tag_listbase(&bmain->object, LIB_TAG_DOIT, false);
-#else
- UNUSED_VARS(op);
-#endif
}
/* Else, poll func ensures us that ID_IS_LINKED(obact) is true. */
else if (obact->type == OB_ARMATURE) {
@@ -2512,8 +2508,8 @@ void OBJECT_OT_make_override_static(wmOperatorType *ot)
/* properties */
PropertyRNA *prop;
- prop = RNA_def_enum(ot->srna, "object", DummyRNA_DEFAULT_items, 0, "Proxy Object",
- "Name of lib-linked/grouped object to make a proxy for");
+ prop = RNA_def_enum(ot->srna, "object", DummyRNA_DEFAULT_items, 0, "Override Object",
+ "Name of lib-linked/group object to make an override from");
RNA_def_enum_funcs(prop, proxy_group_object_itemf);
RNA_def_property_flag(prop, PROP_ENUM_NO_TRANSLATE);
ot->prop = prop;