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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-05-09 16:50:46 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-05-16 12:49:21 +0300
commitb679887bd5f77f2cd4611a4dd77e5177de3c2326 (patch)
tree0eac19355489ef01b8551ee18d5e3f6914837381 /source/blender/depsgraph/DEG_depsgraph_query.h
parentf51521148fef326bd72477481618645306ea0821 (diff)
Depsgraph: Add queries whether ID is original/evaluated
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_query.h')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_query.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index 3030bfb28b3..a7b5535d11a 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -100,6 +100,19 @@ struct Object *DEG_get_original_object(struct Object *object);
/* Get original version of given evaluated ID datablock. */
struct ID *DEG_get_original_id(struct ID *id);
+/* Check whether given ID is an original,
+ *
+ * Original IDs are considered all the IDs which are not covered by copy-on-write system and are
+ * not out-of-main localized datablocks. */
+bool DEG_is_original_id(struct ID *id);
+bool DEG_is_original_object(struct Object *object);
+
+/* Opposite of the above.
+ *
+ * If the datablock is not original it must be evaluated, and vice versa. */
+bool DEG_is_evaluated_id(struct ID *id);
+bool DEG_is_evaluated_object(struct Object *object);
+
/* ************************ DEG object iterators ********************* */
enum {