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>2021-03-12 14:31:25 +0300
committerBastien Montagne <bastien@blender.org>2021-03-12 14:31:25 +0300
commit74557ca4f7cfe14090d6ca245e03e651b4b2524f (patch)
tree72633e2f71ae235e54f60520b06de513a6bc5347 /source/blender/makesrna/RNA_access.h
parentfe2ceef729a1a1013f7a8466318a12343a6a0e15 (diff)
LibOverride: Add a new operation to Outliner to enforce resync of hierarchies.
This is basically done by ignoring override operations from old override affecting ID pointer properties, when the new (destination) one is not NULL. Fix T86501: New object added to overridden collection doesn't show up in linking file on Resync. This is more of a work-around actually, since there is no real way to fix the issue in a fully automated and consistent way, it is caused by older blender files being saved with 'broken' overrides. WARNING: This cannot ensure that some purposedly edited/overridden ID pointer properties won't be lost in the process.
Diffstat (limited to 'source/blender/makesrna/RNA_access.h')
-rw-r--r--source/blender/makesrna/RNA_access.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 74b8517f538..4c60ffe4f16 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -1512,11 +1512,21 @@ bool RNA_struct_override_store(struct Main *bmain,
PointerRNA *ptr_storage,
struct IDOverrideLibrary *override);
+typedef enum eRNAOverrideApplyFlag {
+ RNA_OVERRIDE_APPLY_FLAG_NOP = 0,
+ /**
+ * Hack to work around/fix older broken overrides: Do not apply override operations affecting ID
+ * pointers properties, unless the destination original value (the one being overridden) is NULL.
+ */
+ RNA_OVERRIDE_APPLY_FLAG_IGNORE_ID_POINTERS = 1 << 0,
+} eRNAOverrideApplyFlag;
+
void RNA_struct_override_apply(struct Main *bmain,
struct PointerRNA *ptr_dst,
struct PointerRNA *ptr_src,
struct PointerRNA *ptr_storage,
- struct IDOverrideLibrary *override);
+ struct IDOverrideLibrary *override,
+ const eRNAOverrideApplyFlag flag);
struct IDOverrideLibraryProperty *RNA_property_override_property_find(struct Main *bmain,
PointerRNA *ptr,