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>2016-07-08 20:33:22 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-08 20:33:22 +0300
commit282de867d48fea9cf930e68ef9553ed5d31cc5fd (patch)
treeee8499e5b0c2d0aa2dc1957667814bfee12eb03f /source/blender/blenkernel/intern/library_remap.c
parent77680abaf94b34ac8133fa0b0838e257ea418a20 (diff)
Initial fix for proxy issues regarding new libquery/libremap ID handling code.
libquery now passes an extra flag info to the callback, in case that specific ID usage is considered as indirect. In most cases, it's just set from ID_IS_LINKED_DATABLOCK() result on datablock owner, but in proxy object case we also consider ob->data, materials and pose usages as indirect. Does not fixes all issues yet, but should already make behavior with proxy object saner.
Diffstat (limited to 'source/blender/blenkernel/intern/library_remap.c')
-rw-r--r--source/blender/blenkernel/intern/library_remap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index c56ea891729..b158b3f968b 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -165,13 +165,12 @@ static int foreach_libblock_remap_callback(void *user_data, ID *UNUSED(id_self),
}
if (*id_p && (*id_p == old_id)) {
- const bool is_indirect = (id->lib != NULL);
+ const bool is_indirect = (cb_flag & IDWALK_INDIRECT_USAGE) != 0;
const bool skip_indirect = (id_remap_data->flag & ID_REMAP_SKIP_INDIRECT_USAGE) != 0;
/* Note: proxy usage implies LIB_TAG_EXTERN, so on this aspect it is direct,
* on the other hand since they get reset to lib data on file open/reload it is indirect too...
* Edit Mode is also a 'skip direct' case. */
const bool is_obj = (GS(id->name) == ID_OB);
- const bool is_proxy = (is_obj && (((Object *)id)->proxy || ((Object *)id)->proxy_group));
const bool is_obj_editmode = (is_obj && BKE_object_is_in_editmode((Object *)id));
const bool is_never_null = ((cb_flag & IDWALK_NEVER_NULL) && (new_id == NULL) &&
(id_remap_data->flag & ID_REMAP_FORCE_NEVER_NULL_USAGE) == 0);
@@ -189,12 +188,12 @@ static int foreach_libblock_remap_callback(void *user_data, ID *UNUSED(id_self),
/* Special hack in case it's Object->data and we are in edit mode (skipped_direct too). */
if ((is_never_null && skip_never_null) ||
(is_obj_editmode && (((Object *)id)->data == *id_p)) ||
- (skip_indirect && (is_proxy || is_indirect)))
+ (skip_indirect && is_indirect))
{
if (is_indirect) {
id_remap_data->skipped_indirect++;
}
- else if (is_never_null || is_proxy || is_obj_editmode) {
+ else if (is_never_null || is_obj_editmode) {
id_remap_data->skipped_direct++;
}
else {