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>2017-08-25 17:11:35 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-09-04 13:56:22 +0300
commitfc26280bcb6cd3847c95b83835c1155975dafbd3 (patch)
tree8f67602d1c2bb5f9cd74f86a00bba888912bbe41
parent75e392ae9f8fac8c4cadddebc14494ce6fcdb5c4 (diff)
Fix T52481: After making all local, local proxies of linked data get broken after file save and reload.
Issue was nasty hidden one, the dual status (mix of local and linked) of proxies striking again. Here, remapping process was considering obdata pointer of proxies as indirect usage, hence clearing the 'LIB_TAG_EXTERN' of obdata pointer. That would make savetoblend code not store any 'lib placeholder' for obdata data-block, which was hence lost on next file read. Another (probably better) solution here would be to actually consider obdata of proxies are fully indirect usage, and simply reassign proxies from their linked object's obdata on file read... However, that change shall be safer for now, probably good for 2.79 too.
-rw-r--r--source/blender/blenkernel/intern/library_remap.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index 28a0f2e7a79..792144f65c6 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -186,8 +186,8 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id
const bool skip_never_null = (id_remap_data->flag & ID_REMAP_SKIP_NEVER_NULL_USAGE) != 0;
#ifdef DEBUG_PRINT
- printf("In %s: Remapping %s (%p) to %s (%p) (skip_indirect: %d)\n",
- id->name, old_id->name, old_id, new_id ? new_id->name : "<NONE>", new_id, skip_indirect);
+ printf("In %s: Remapping %s (%p) to %s (%p) (is_indirect: %d, skip_indirect: %d)\n",
+ id->name, old_id->name, old_id, new_id ? new_id->name : "<NONE>", new_id, is_indirect, skip_indirect);
#endif
if ((id_remap_data->flag & ID_REMAP_FLAG_NEVER_NULL_USAGE) && (cb_flag & IDWALK_CB_NEVER_NULL)) {
@@ -201,6 +201,14 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id
{
if (is_indirect) {
id_remap_data->skipped_indirect++;
+ if (is_obj) {
+ Object *ob = (Object *)id;
+ if (ob->data == *id_p && ob->proxy != NULL) {
+ /* And another 'Proudly brought to you by Proxy Hell' hack!
+ * This will allow us to avoid clearing 'LIB_EXTERN' flag of obdata of proxies... */
+ id_remap_data->skipped_direct++;
+ }
+ }
}
else if (is_never_null || is_obj_editmode) {
id_remap_data->skipped_direct++;