[Bf-blender-cvs] [5983178d90b] gpencil-new-data-proposal: LibOverride: Make fully editable when creating an experimental user setting.
Bastien Montagne
noreply at git.blender.org
Fri Jul 8 17:57:50 CEST 2022
Commit: 5983178d90b65258c75095648fd2eaf84849e5ed
Author: Bastien Montagne
Date: Thu Jul 7 18:17:30 2022 +0200
Branches: gpencil-new-data-proposal
https://developer.blender.org/rB5983178d90b65258c75095648fd2eaf84849e5ed
LibOverride: Make fully editable when creating an experimental user setting.
This is temporary to investigate which behavior should be kept when
creating an override hierarchy if there are no cherry-picked data
defined: make all overrides user-editable, or not.
This removes the 'make override - fully editable' menu entries.
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
M release/scripts/startup/bl_ui/space_view3d.py
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/object/object_relations.c
M source/blender/editors/space_outliner/outliner_tools.cc
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 5070bd04142..e08b921b1a9 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2279,6 +2279,7 @@ 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/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 91422a817f5..72119030919 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2354,8 +2354,6 @@ class VIEW3D_MT_object_relations(Menu):
layout = self.layout
layout.operator("object.make_override_library", text="Make Library Override...")
- layout.operator("object.make_override_library",
- text="Make Library Override - Fully Editable...").do_fully_editable = True
layout.operator("object.make_dupli_face")
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 96d31700eb9..14da5a7cd62 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -741,8 +741,15 @@ static void template_id_liboverride_hierarchy_create(bContext *C,
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, false);
+ BKE_lib_override_library_create(bmain,
+ scene,
+ view_layer,
+ NULL,
+ id,
+ &collection_active->id,
+ NULL,
+ &id_override,
+ U.experimental.use_override_new_fully_editable);
}
else if (object_active != NULL && !ID_IS_LINKED(object_active) &&
&object_active->instance_collection->id == id) {
@@ -755,7 +762,7 @@ static void template_id_liboverride_hierarchy_create(bContext *C,
&object_active->id,
&object_active->id,
&id_override,
- false);
+ U.experimental.use_override_new_fully_editable);
}
break;
case ID_OB:
@@ -765,8 +772,15 @@ static void template_id_liboverride_hierarchy_create(bContext *C,
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, false);
+ BKE_lib_override_library_create(bmain,
+ scene,
+ view_layer,
+ NULL,
+ id,
+ &collection_active->id,
+ NULL,
+ &id_override,
+ U.experimental.use_override_new_fully_editable);
}
break;
case ID_ME:
@@ -796,12 +810,19 @@ static void template_id_liboverride_hierarchy_create(bContext *C,
&collection_active->id,
NULL,
&id_override,
- false);
+ U.experimental.use_override_new_fully_editable);
}
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, false);
+ BKE_lib_override_library_create(bmain,
+ scene,
+ view_layer,
+ NULL,
+ id,
+ &object_active->id,
+ NULL,
+ &id_override,
+ U.experimental.use_override_new_fully_editable);
}
}
break;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index f55ffdf0fcd..b58b0dac79b 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2267,7 +2267,7 @@ 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 = RNA_boolean_get(op->ptr, "do_fully_editable");
+ 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,
@@ -2495,13 +2495,6 @@ void OBJECT_OT_make_override_library(wmOperatorType *ot)
INT_MAX);
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
ot->prop = prop;
-
- prop = RNA_def_boolean(ot->srna,
- "do_fully_editable",
- false,
- "Create Fully Editable",
- "Make all created override data-blocks fully editable");
- RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
}
/** \} */
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index 04e74f5438b..7b7182eb106 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -1995,7 +1995,6 @@ enum eOutlinerIdOpTypes {
OUTLINER_IDOP_LOCAL,
OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE,
OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY,
- OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY_FULLY_EDITABLE,
OUTLINER_IDOP_OVERRIDE_LIBRARY_MAKE_EDITABLE,
OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET,
OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET_HIERARCHY,
@@ -2041,12 +2040,6 @@ static const EnumPropertyItem prop_id_op_types[] = {
"Make Library Override Hierarchy",
"Make a local override of this linked data-block, and its hierarchy of dependencies - only "
"applies to active Outliner item"},
- {OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY_FULLY_EDITABLE,
- "OVERRIDE_LIBRARY_CREATE_HIERARCHY_FULLY_EDITABLE",
- 0,
- "Make Library Override Hierarchy Fully Editable",
- "Make a local override of this linked data-block, and its hierarchy of dependencies, making "
- "them all fully user-editable - only applies to active Outliner item"},
{OUTLINER_IDOP_OVERRIDE_LIBRARY_MAKE_EDITABLE,
"OVERRIDE_LIBRARY_MAKE_EDITABLE",
0,
@@ -2126,7 +2119,6 @@ static bool outliner_id_operation_item_poll(bContext *C,
}
return false;
case OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY:
- case OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY_FULLY_EDITABLE:
if (ID_IS_OVERRIDABLE_LIBRARY(tselem->id) || (ID_IS_LINKED(tselem->id))) {
return true;
}
@@ -2270,6 +2262,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
case OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY: {
OutlinerLibOverrideData override_data{};
override_data.do_hierarchy = true;
+ override_data.do_fully_editable = U.experimental.use_override_new_fully_editable;
outliner_do_libdata_operation(C,
op->reports,
scene,
@@ -2283,23 +2276,6 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
ED_undo_push(C, "Overridden Data Hierarchy");
break;
}
- case OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY_FULLY_EDITABLE: {
- OutlinerLibOverrideData override_data{};
- override_data.do_hierarchy = true;
- override_data.do_fully_editable = true;
- outliner_do_libdata_operation(C,
- op->reports,
- scene,
- space_outliner,
- id_override_library_create_hierarchy_pre_process_fn,
- &override_data);
- outliner_do_libdata_operation(
- C, op->reports, scene, space_outliner, id_override_library_create_fn, &override_data);
- id_override_library_create_hierarchy_post_process(C, &override_data);
-
- ED_undo_push(C, "Overridden Data Hierarchy Fully Editable");
- break;
- }
case OUTLINER_IDOP_OVERRIDE_LIBRARY_MAKE_EDITABLE: {
outliner_do_libdata_operation(C,
op->reports,
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index d00826208be..753c41f7f1b 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -637,6 +637,7 @@ 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;
@@ -654,6 +655,7 @@ typed
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list