Add WorkSpace to list of ID types that are not supported by standard copy mechanism...
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 11 Mar 2019 19:43:25 +0000 (20:43 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 11 Mar 2019 19:45:24 +0000 (20:45 +0100)
Am not sure whether we want to support that at some point, but at least
if we don’t, make it safe and get out of copy code early, previously
trying to duplicate workspace through BKE_id_copy() would have given a
very bad a broken result...

source/blender/blenkernel/intern/library.c

index 52796d0..a66030a 100644 (file)
@@ -515,7 +515,7 @@ static int id_copy_libmanagement_cb(void *user_data, ID *UNUSED(id_self), ID **i
 
 bool BKE_id_copy_is_allowed(const ID *id)
 {
-#define LIB_ID_TYPES_NOCOPY ID_LI, ID_SCR, ID_WM,  /* Not supported */ \
+#define LIB_ID_TYPES_NOCOPY ID_LI, ID_SCR, ID_WM, ID_WS,  /* Not supported */ \
                             ID_IP  /* Deprecated */
 
        return !ELEM(GS(id->name), LIB_ID_TYPES_NOCOPY);