[Bf-blender-cvs] [d8da816] asset-engine: Add more macros to differentiate actual linked datablocks from 'virtually' linked ones (assets only).
Bastien Montagne
noreply at git.blender.org
Sun Jul 24 18:13:46 CEST 2016
Commit: d8da816a7ce9d6ec89ad6733089d2727dbf3a74a
Author: Bastien Montagne
Date: Sat Jul 16 15:54:46 2016 +0200
Branches: asset-engine
https://developer.blender.org/rBd8da816a7ce9d6ec89ad6733089d2727dbf3a74a
Add more macros to differentiate actual linked datablocks from 'virtually' linked ones (assets only).
Not yet used in code.
===================================================================
M source/blender/makesdna/DNA_ID.h
===================================================================
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index d7feb3a..0936284 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -354,7 +354,10 @@ typedef struct PreviewImage {
#define ID_MISSING(_id) (((_id)->tag & LIB_TAG_MISSING) != 0)
-#define ID_IS_LINKED_DATABLOCK(_id) (((ID *)(_id))->lib != NULL)
+#define ID_IS_LINKED(_id) (((ID *)(_id))->lib != NULL)
+#define LIB_IS_VIRTUAL(_lib) (((_lib)->flag & LIBRARY_FLAG_VIRTUAL) != 0)
+#define ID_IS_LINKED_DATABLOCK(_id) (ID_IS_LINKED(_id) && !LIB_IS_VIRTUAL(((ID *)(_id))->lib))
+#define ID_IS_LINKED_DATAPATH(_id) (ID_IS_LINKED(_id) && LIB_IS_VIRTUAL(((ID *)(_id))->lib))
#ifdef GS
# undef GS
More information about the Bf-blender-cvs
mailing list