diff options
author | Bastien Montagne <bastien@blender.org> | 2022-08-17 19:07:09 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-08-17 19:08:18 +0300 |
commit | 244ef1f0f53344944642ed0efc016885314f7fd7 (patch) | |
tree | 61cd5e34e7615406970f3fe51a53544f348dc6af /source/blender | |
parent | 92493a5fa74ac2926cb83fbb1182ba82f047782f (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 37 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 13 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 9 |
4 files changed, 16 insertions, 45 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 43c96302991..35e368bc6d6 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -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; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 5c88d17c092..972912e8863 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -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)) { diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 7ec2ee5f41a..f240e0e78cd 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -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; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index cfc72791123..1667c9e3013 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -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( |