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 <bastien@blender.org>2020-09-19 13:13:04 +0300
committerBastien Montagne <bastien@blender.org>2020-09-20 18:00:07 +0300
commit86c5d1f4aa07551b289619da501889a172a39e03 (patch)
tree1983e7dd4080e31089e3793b7eb5a631afb8d379 /source/blender/makesdna
parent1c98bb83a4d401478188eaf1e8dd52c7c489c3a5 (diff)
LibOverride: add checks to RNA collections editing utils.
Collections of liboverride data only support insertion of new items (and deleting or moving those around). No operation on existing items from linked data is allowed. Reflect that in RNA functions used to edit py-defined RNA collections. Note that this is not ideal currently, it does the job but feedback to user is rather poor. Ideally add-ons should implement higher-level checks for override cases in their operators.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 1e24ec24dc2..ea1e1d7ee0e 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -130,6 +130,11 @@ enum {
* Should only be used/be relevant for custom properties. */
IDP_FLAG_OVERRIDABLE_LIBRARY = 1 << 0,
+ /** This collection item IDProp has been inserted in a local override.
+ * This is used by internal code to distinguish between library-originated items and
+ * local-insterted ones, as many operations are not allowed on the former. */
+ IDP_FLAG_OVERRIDELIBRARY_LOCAL = 1 << 1,
+
/** This means the property is set but RNA will return false when checking
* 'RNA_property_is_set', currently this is a runtime flag */
IDP_FLAG_GHOST = 1 << 7,