LibOverride: Remove the 'make all editable' user preferences.

This behavior is now implicitely controlled by the 'Make' operations,
based either on context or selected items.
This commit is contained in:
Bastien Montagne 2022-08-17 18:07:09 +02:00
parent 92493a5fa7
commit 244ef1f0f5
5 changed files with 16 additions and 46 deletions

View File

@ -2274,7 +2274,6 @@ class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel):
({"property": "use_full_frame_compositor"}, "T88150"),
({"property": "enable_eevee_next"}, "T93220"),
({"property": "use_draw_manager_acquire_lock"}, "T98016"),
({"property": "use_override_new_fully_editable"}, None),
),
)

View File

@ -762,15 +762,8 @@ ID *ui_template_id_liboverride_hierarchy_create(
if (object_active != NULL) {
object_active->id.tag |= LIB_TAG_DOIT;
}
BKE_lib_override_library_create(bmain,
scene,
view_layer,
NULL,
id,
&collection_active->id,
NULL,
&id_override,
U.experimental.use_override_new_fully_editable);
BKE_lib_override_library_create(
bmain, scene, view_layer, NULL, id, &collection_active->id, NULL, &id_override, false);
}
else if (object_active != NULL && !ID_IS_LINKED(object_active) &&
&object_active->instance_collection->id == id) {
@ -783,7 +776,7 @@ ID *ui_template_id_liboverride_hierarchy_create(
&object_active->id,
&object_active->id,
&id_override,
U.experimental.use_override_new_fully_editable);
false);
}
break;
case ID_OB:
@ -793,15 +786,8 @@ ID *ui_template_id_liboverride_hierarchy_create(
if (object_active != NULL) {
object_active->id.tag |= LIB_TAG_DOIT;
}
BKE_lib_override_library_create(bmain,
scene,
view_layer,
NULL,
id,
&collection_active->id,
NULL,
&id_override,
U.experimental.use_override_new_fully_editable);
BKE_lib_override_library_create(
bmain, scene, view_layer, NULL, id, &collection_active->id, NULL, &id_override, false);
}
break;
case ID_ME:
@ -832,19 +818,12 @@ ID *ui_template_id_liboverride_hierarchy_create(
&collection_active->id,
NULL,
&id_override,
U.experimental.use_override_new_fully_editable);
false);
}
else {
object_active->id.tag |= LIB_TAG_DOIT;
BKE_lib_override_library_create(bmain,
scene,
view_layer,
NULL,
id,
&object_active->id,
NULL,
&id_override,
U.experimental.use_override_new_fully_editable);
BKE_lib_override_library_create(
bmain, scene, view_layer, NULL, id, &object_active->id, NULL, &id_override, false);
}
}
break;

View File

@ -2280,12 +2280,6 @@ static int make_override_library_exec(bContext *C, wmOperator *op)
ID *id_root = NULL;
bool is_override_instancing_object = false;
const bool do_fully_editable = U.experimental.use_override_new_fully_editable;
GSet *user_overrides_objects_uids = do_fully_editable ? NULL :
BLI_gset_new(BLI_ghashutil_inthash_p,
BLI_ghashutil_intcmp,
__func__);
bool user_overrides_from_selected_objects = false;
if (!ID_IS_LINKED(obact) && obact->instance_collection != NULL &&
@ -2325,6 +2319,13 @@ static int make_override_library_exec(bContext *C, wmOperator *op)
user_overrides_from_selected_objects = true;
}
const bool do_fully_editable = !user_overrides_from_selected_objects;
GSet *user_overrides_objects_uids = do_fully_editable ? NULL :
BLI_gset_new(BLI_ghashutil_inthash_p,
BLI_ghashutil_intcmp,
__func__);
/* Make already existing selected liboverrides editable. */
FOREACH_SELECTED_OBJECT_BEGIN (view_layer, CTX_wm_view3d(C), ob_iter) {
if (ID_IS_OVERRIDE_LIBRARY_REAL(ob_iter) && !ID_IS_LINKED(ob_iter)) {

View File

@ -637,11 +637,11 @@ typedef struct UserDef_Experimental {
/* Debug options, always available. */
char use_undo_legacy;
char no_override_auto_resync;
char use_override_new_fully_editable;
char use_cycles_debug;
char show_asset_debug_info;
char no_asset_indexing;
char SANITIZE_AFTER_HERE;
char _pad0;
/* The following options are automatically sanitized (set to 0)
* when the release cycle is not alpha. */
char use_new_curves_tools;

View File

@ -6301,15 +6301,6 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
"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_override_new_fully_editable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_override_new_fully_editable", 1);
RNA_def_property_ui_text(
prop,
"Override New Fully Editable",
"Make all override of a hierarchy fully user-editable by default when creating a new "
"override (if that option is disabled, most overrides created as part of a hierarchy will "
"not be editable by the user by default)");
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(