[Bf-blender-cvs] [2b838a96b24] temp-lineart-contained: LibOverride: Make PointCache RNA properties overridable.

Bastien Montagne noreply at git.blender.org
Sat Dec 19 06:18:53 CET 2020


Commit: 2b838a96b24ec588d7f8e9fd377ce9bef9540a8a
Author: Bastien Montagne
Date:   Fri Nov 13 14:12:03 2020 +0100
Branches: temp-lineart-contained
https://developer.blender.org/rB2b838a96b24ec588d7f8e9fd377ce9bef9540a8a

LibOverride: Make PointCache RNA properties overridable.

Note that due to convoluted layout of point caches in RNA (active one
also storing list of all available ones), we'll often have the
pointcache overrides rules twice. Should not be a huge problem,
practically speaking.

Part of first step of T82503: support disk cache in liboverrides.

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

M	source/blender/makesrna/intern/rna_object_force.c

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

diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 19a367a0c55..ee87ad19cbb 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -944,6 +944,8 @@ static void rna_def_pointcache_common(StructRNA *srna)
 
   RNA_def_struct_path_func(srna, "rna_PointCache_path");
 
+  RNA_define_lib_overridable(true);
+
   prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
   RNA_def_property_int_sdna(prop, NULL, "startframe");
   RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
@@ -1038,6 +1040,8 @@ static void rna_def_pointcache_common(StructRNA *srna)
       "Use this file's path for the disk cache when library linked into another file "
       "(for local bakes per scene file, disable this option)");
   RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
+
+  RNA_define_lib_overridable(false);
 }
 
 static void rna_def_ptcache_point_caches(BlenderRNA *brna, PropertyRNA *cprop)
@@ -1099,6 +1103,7 @@ static void rna_def_pointcache_active(BlenderRNA *brna)
                                     NULL);
   RNA_def_property_struct_type(prop, "PointCacheItem");
   RNA_def_property_ui_text(prop, "Point Cache List", "");
+  RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   rna_def_ptcache_point_caches(brna, prop);
 }



More information about the Bf-blender-cvs mailing list