diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-04-18 12:38:38 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-04-18 12:41:07 +0300 |
commit | 2117e46e5b85ac9e2e99afa7ddc305f81da1dffe (patch) | |
tree | 9987f06279bcc5f194d709837b95e71c592b53d4 /source/blender/blenkernel/intern/library_override.c | |
parent | 10ce4719d441616e06b2e94d374b510413b11b10 (diff) |
Disable auto-override for all but active object in group case.
I.E. only enable auto-override for 'active' selected object when making
an override of a linked group. This will ease on auto-override creation,
and you typically do not want to auto-override most objects in the group
anyway (in proxy system, you could only proxyfy one object of the group
anyaway!).
Diffstat (limited to 'source/blender/blenkernel/intern/library_override.c')
-rw-r--r-- | source/blender/blenkernel/intern/library_override.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/library_override.c b/source/blender/blenkernel/intern/library_override.c index a90a7196aad..653a590e7f2 100644 --- a/source/blender/blenkernel/intern/library_override.c +++ b/source/blender/blenkernel/intern/library_override.c @@ -511,13 +511,13 @@ bool BKE_override_static_status_check_reference(ID *local) * are much cheaper. * * \return true is new overriding op was created, or some local data was reset. */ -bool BKE_override_static_operations_create(ID *local) +bool BKE_override_static_operations_create(ID *local, const bool force_auto) { BLI_assert(local->override_static != NULL); const bool is_template = (local->override_static->reference == NULL); bool ret = false; - if (!is_template && local->flag & LIB_OVERRIDE_STATIC_AUTO) { + if (!is_template && (force_auto || local->flag & LIB_OVERRIDE_STATIC_AUTO)) { PointerRNA rnaptr_local, rnaptr_reference; RNA_id_pointer_create(local, &rnaptr_local); RNA_id_pointer_create(local->override_static->reference, &rnaptr_reference); @@ -545,7 +545,7 @@ bool BKE_override_static_operations_create(ID *local) } /** Check all overrides from given \a bmain and create/update overriding operations as needed. */ -void BKE_main_override_static_operations_create(Main *bmain) +void BKE_main_override_static_operations_create(Main *bmain, const bool force_auto) { ListBase *lbarray[MAX_LIBARRAY]; int base_count, i; @@ -557,8 +557,10 @@ void BKE_main_override_static_operations_create(Main *bmain) ID *id; for (id = lb->first; id; id = id->next) { - if (ID_IS_STATIC_OVERRIDE_AUTO(id) && (id->tag & LIB_TAG_OVERRIDESTATIC_AUTOREFRESH)) { - BKE_override_static_operations_create(id); + if (force_auto || + (ID_IS_STATIC_OVERRIDE_AUTO(id) && (id->tag & LIB_TAG_OVERRIDESTATIC_AUTOREFRESH))) + { + BKE_override_static_operations_create(id, force_auto); id->tag &= ~LIB_TAG_OVERRIDESTATIC_AUTOREFRESH; } } @@ -686,7 +688,7 @@ ID *BKE_override_static_operations_store_start(OverrideStaticStorage *override_s } /* Forcefully ensure we know about all needed override operations. */ - BKE_override_static_operations_create(local); + BKE_override_static_operations_create(local, false); ID *storage_id; #ifdef DEBUG_OVERRIDE_TIMEIT |