LibOverride Auto Resync: Add option to disable it in Experimental userpref.

Some older .blend files won't react nicely to auto-resync, they need to
get manually fixed with `resync enforce` first.
This commit is contained in:
Bastien Montagne
2021-03-12 16:45:45 +01:00
parent ef5782e297
commit f707783d5f
4 changed files with 12 additions and 2 deletions

View File

@@ -2269,6 +2269,7 @@ class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel):
self._draw_items(
context, (
({"property": "use_undo_legacy"}, "T60695"),
({"property": "override_auto_resync"}, "T83811"),
({"property": "use_cycles_debug"}, None),
),
)

View File

@@ -395,7 +395,7 @@ static void setup_app_data(bContext *C,
BKE_main_id_refcount_recompute(bmain, false);
}
if (mode != LOAD_UNDO) {
if (mode != LOAD_UNDO && !USER_EXPERIMENTAL_TEST(&U, no_override_auto_resync)) {
BKE_lib_override_library_main_resync(
bmain,
curscene,

View File

@@ -635,6 +635,7 @@ typedef struct UserDef_FileSpaceData {
typedef struct UserDef_Experimental {
/* Debug options, always available. */
char use_undo_legacy;
char no_override_auto_resync;
char use_cycles_debug;
char SANITIZE_AFTER_HERE;
/* The following options are automatically sanitized (set to 0)
@@ -645,7 +646,7 @@ typedef struct UserDef_Experimental {
char use_switch_object_operator;
char use_sculpt_tools_tilt;
char use_asset_browser;
char _pad[7];
char _pad[6];
/** `makesdna` does not allow empty structs. */
} UserDef_Experimental;

View File

@@ -6245,6 +6245,14 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
"Undo Legacy",
"Use legacy undo (slower than the new default one, but may be more stable in some cases)");
prop = RNA_def_property(srna, "override_auto_resync", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "no_override_auto_resync", 1);
RNA_def_property_ui_text(
prop,
"Override Auto Resync",
"Enable library overrides automatic resync detection and process on file load. Disable when "
"dealing with older .blend files that need manual Resync (Enforce) handling");
prop = RNA_def_property(srna, "use_new_point_cloud_type", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_new_point_cloud_type", 1);
RNA_def_property_ui_text(