[Bf-blender-cvs] [244ef1f0f53] blender-v3.3-release: LibOverride: Remove the 'make all editable' user preferences.

Bastien Montagne noreply at git.blender.org
Wed Aug 17 18:08:23 CEST 2022


Commit: 244ef1f0f53344944642ed0efc016885314f7fd7
Author: Bastien Montagne
Date:   Wed Aug 17 18:07:09 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB244ef1f0f53344944642ed0efc016885314f7fd7

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.

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

M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/editors/interface/interface_templates.c
M	source/blender/editors/object/object_relations.c
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesrna/intern/rna_userdef.c

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

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 52b2fb7f3da..a42c38c64c2 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -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),
             ),
         )
 
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(



More information about the Bf-blender-cvs mailing list