[Bf-blender-cvs] [25c1ff7fc57] liboverride-systemoverrides: LibOverride: make some override properties 'overridable'.

Bastien Montagne noreply at git.blender.org
Tue Mar 8 15:53:52 CET 2022


Commit: 25c1ff7fc57b4b913213221a28bb12b9df657771
Author: Bastien Montagne
Date:   Wed Feb 23 10:39:48 2022 +0100
Branches: liboverride-systemoverrides
https://developer.blender.org/rB25c1ff7fc57b4b913213221a28bb12b9df657771

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.

===================================================================

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 f52991c551b..2bda69bc117 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -1828,6 +1828,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",
@@ -1837,6 +1838,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",
@@ -1992,6 +1994,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