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.
This commit is contained in:
parent
b8605ee458
commit
7cfea48752
|
@ -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),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 @@ typedef struct UserDef_Experimental {
|
|||
char enable_eevee_next;
|
||||
char use_sculpt_texture_paint;
|
||||
char use_draw_manager_acquire_lock;
|
||||
char _pad[7];
|
||||
/** `makesdna` does not allow empty structs. */
|
||||
} UserDef_Experimental;
|
||||
|
||||
|
|
|
@ -6392,6 +6392,15 @@ 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(
|
||||
|
|
Loading…
Reference in New Issue