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-06-01 15:30:26 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-01 15:31:29 +0300
commit3b05034935c482bd3cf377b03549df8d87af90d9 (patch)
tree535498d9d017e6915743993ddfc981c2bbaad96a /source/blender/editors/object
parentddf2a5828215cdd77a93fcbf2041f600349f8e55 (diff)
Fix broken logic in make static override operators for Collections.
Was pretty sure I already fixed that some weeks ago... but look like it was not committed or somehow lost...
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_relations.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index aee8c3f9122..d417437ad99 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2304,7 +2304,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op)
}
FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
- /* Then, we make static override of the whole set of objects in the collection. */
+ /* Then, we remove (untag) bone shape objects, you shall never want to override those (hopefully)... */
FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(collection, ob)
{
if (ob->type == OB_ARMATURE && ob->pose != NULL) {
@@ -2325,18 +2325,16 @@ static int make_override_static_exec(bContext *C, wmOperator *op)
Collection *new_collection = (Collection *)collection->id.newid;
FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(new_collection, new_ob)
{
- if (new_ob != NULL &&
- new_ob->id.override_static != NULL &&
- (base = BKE_view_layer_base_find(view_layer, new_ob)) == NULL)
- {
- BKE_collection_object_add_from(bmain, scene, obcollection, new_ob);
- DEG_id_tag_update_ex(bmain, &new_ob->id, OB_RECALC_OB | DEG_TAG_BASE_FLAGS_UPDATE);
+ if (new_ob != NULL && new_ob->id.override_static != NULL) {
+ if ((base = BKE_view_layer_base_find(view_layer, new_ob)) == NULL) {
+ BKE_collection_object_add_from(bmain, scene, obcollection, new_ob);
+ DEG_id_tag_update_ex(bmain, &new_ob->id, DEG_TAG_TRANSFORM | DEG_TAG_BASE_FLAGS_UPDATE);
+ }
/* parent to 'collection' empty */
if (new_ob->parent == NULL) {
new_ob->parent = obcollection;
}
if (new_ob == (Object *)obact->id.newid) {
- base = BKE_view_layer_base_find(view_layer, new_ob);
BKE_view_layer_base_select(view_layer, base);
}
else {