Fix T52314: New ID copy code (rBrB9da7dfa1586d) Breaks node previews in compositor.
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 10 Aug 2017 08:26:22 +0000 (10:26 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 10 Aug 2017 08:28:13 +0000 (10:28 +0200)
"Just" forgot to copy data block's name in 'NO_MAIN' case... *sigh*

source/blender/blenkernel/intern/library.c

index 8bc6465d98ee1b5fab034f61489bcbc5bd6c5f69..0ccf67e7f8ef24d1a406f1f335bff1c9aa11f47e 100644 (file)
@@ -1132,6 +1132,9 @@ void *BKE_libblock_alloc(Main *bmain, short type, const char *name, const int fl
                                DAG_id_type_tag(bmain, type);
                        }
                }
+               else {
+                       BLI_strncpy(id->name + 2, name, sizeof(id->name) - 2);
+               }
        }
 
        return id;