Add WorkSpace to list of ID types that are not supported by standard copy mechanism for now.

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...
This commit is contained in:
Bastien Montagne
2019-03-11 20:43:25 +01:00
parent 057117de78
commit d7e7e9af02

View 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);