diff options
author | Bastien Montagne <bastien@blender.org> | 2022-02-23 12:39:48 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-03-29 18:59:05 +0300 |
commit | b5f2c776587d1e155da868cfbe530f56f1182310 (patch) | |
tree | 61086efc635cc17a8cbe11ba2124773ebee8d5a5 /source/blender/makesrna/intern | |
parent | 9394d455af43b3b4b00bf4f65e250f14567970fd (diff) |
LibOverride: make some override properties 'overridable'.
The whole liboverride data is still ignored by override diffing etc.,
but some of their flags should be editable (from script and/or advanced
technical/debug UI). So using a weird combination of flags to achieve
this.
Ref: {T95707}.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 7fa6dad7730..5f264a19d47 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -1832,6 +1832,7 @@ static void rna_def_ID_override_library(BlenderRNA *brna) "hierarchy, or as a single, isolated and autonomous override"); RNA_def_property_update(prop, NC_WM | ND_LIB_OVERRIDE_CHANGED, NULL); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IDOVERRIDE_LIBRARY_FLAG_NO_HIERARCHY); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); prop = RNA_def_boolean(srna, "is_system_override", @@ -1841,6 +1842,7 @@ static void rna_def_ID_override_library(BlenderRNA *brna) "or if it is actually editable by the user"); RNA_def_property_update(prop, NC_WM | ND_LIB_OVERRIDE_CHANGED, NULL); RNA_def_property_boolean_sdna(prop, NULL, "flag", IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); prop = RNA_def_collection(srna, "properties", @@ -1996,6 +1998,8 @@ static void rna_def_ID(BlenderRNA *brna) prop = RNA_def_pointer( srna, "override_library", "IDOverrideLibrary", "Library Override", "Library override data"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_override_flag(prop, + PROPOVERRIDE_NO_COMPARISON | PROPOVERRIDE_OVERRIDABLE_LIBRARY); prop = RNA_def_pointer(srna, "preview", |