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.
This commit is contained in:
parent
75ea4b8a1f
commit
59910f7217
Notes:
blender-bot
2023-02-14 06:42:54 +01:00
Referenced by issue #82503, Add Support of PointCaches to Library Overrides
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue