[Bf-blender-cvs] [b5f2c776587] master: LibOverride: make some override properties 'overridable'.
Bastien Montagne
noreply at git.blender.org
Tue Mar 29 18:05:44 CEST 2022
Commit: b5f2c776587d1e155da868cfbe530f56f1182310
Author: Bastien Montagne
Date: Wed Feb 23 10:39:48 2022 +0100
Branches: master
https://developer.blender.org/rBb5f2c776587d1e155da868cfbe530f56f1182310
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}.
===================================================================
M source/blender/makesrna/intern/rna_ID.c
===================================================================
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",
More information about the Bf-blender-cvs
mailing list