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-12-18 14:01:50 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-12-18 14:01:50 +0300
commit4c9f303ebad6c28d6bd6ce013011d85b11a932d0 (patch)
treec16d2ce2d32a3dd36406f19a2342be4c10b225bd /source/blender/makesdna/DNA_ID.h
parent98aa51ffa1d8918a3f84974559d8652daa0edbf2 (diff)
Add macros to check whether an ID is a static override or has a template for it.
Diffstat (limited to 'source/blender/makesdna/DNA_ID.h')
-rw-r--r--source/blender/makesdna/DNA_ID.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 78624e17d73..a2f64627787 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -374,6 +374,12 @@ typedef enum ID_Type {
#define ID_IS_LINKED(_id) (((ID *)(_id))->lib != NULL)
+#define ID_IS_STATIC_OVERRIDE(_id) (((ID *)(_id))->override_static != NULL && \
+ ((ID *)(_id))->override_static->reference != NULL)
+
+#define ID_IS_STATIC_OVERRIDE_TEMPLATE(_id) (((ID *)(_id))->override_static != NULL && \
+ ((ID *)(_id))->override_static->reference == NULL)
+
#ifdef GS
# undef GS
#endif