diff options
author | Bastien Montagne <bastien@blender.org> | 2020-07-13 17:44:41 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-07-13 17:45:55 +0300 |
commit | 3d587efef2872a4466432679bad0c8bc6cc0a335 (patch) | |
tree | 4d7aecd930ce2f195f8d26c14eac5bb5e2ad7076 /source/blender/editors | |
parent | 5c8dd2a703b5e18c179148f1b8fab6baeee3e7c0 (diff) |
LibOverride: Cleanup: Remove option to disable library overrides.
Code is mature enough now to not need this anymore, people who do not
want to use liboverrides can just not create them.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 12 |
3 files changed, 9 insertions, 13 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index d735c9d55fc..ba3d2d29603 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -559,7 +559,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) case UI_ID_LOCAL: if (id) { Main *bmain = CTX_data_main(C); - if (BKE_lib_override_library_is_enabled() && CTX_wm_window(C)->eventstate->shift) { + if (CTX_wm_window(C)->eventstate->shift) { if (ID_IS_OVERRIDABLE_LIBRARY(id)) { /* Only remap that specific ID usage to overriding local data-block. */ ID *override_id = BKE_lib_override_library_create_from_id(bmain, id, false); @@ -931,10 +931,8 @@ static void template_ID(const bContext *C, 0, 0, 0, - BKE_lib_override_library_is_enabled() ? - TIP_("Direct linked library data-block, click to make local, " - "Shift + Click to create a library override") : - TIP_("Direct linked library data-block, click to make local")); + TIP_("Direct linked library data-block, click to make local, " + "Shift + Click to create a library override")); if (disabled) { UI_but_flag_enable(but, UI_BUT_DISABLED); } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index ac41028089c..b81fea1848c 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2523,7 +2523,7 @@ static bool make_override_library_poll(bContext *C) Object *obact = CTX_data_active_object(C); /* Object must be directly linked to be overridable. */ - return (BKE_lib_override_library_is_enabled() && ED_operator_objectmode(C) && obact != NULL && + return (ED_operator_objectmode(C) && obact != NULL && ((ID_IS_LINKED(obact) && obact->id.tag & LIB_TAG_EXTERN) || (!ID_IS_LINKED(obact) && obact->instance_collection != NULL && ID_IS_LINKED(obact->instance_collection)))); diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 419e25d5dca..ac78c711a1a 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1563,7 +1563,7 @@ static bool outliner_id_operation_item_poll(bContext *C, switch (enum_value) { case OUTLINER_IDOP_OVERRIDE_LIBRARY: - return BKE_lib_override_library_is_enabled(); + return true; case OUTLINER_IDOP_SINGLE: if (!soops || ELEM(soops->outlinevis, SO_SCENES, SO_VIEW_LAYER)) { return true; @@ -1677,12 +1677,10 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) break; } case OUTLINER_IDOP_OVERRIDE_LIBRARY: { - if (BKE_lib_override_library_is_enabled()) { - /* make local */ - outliner_do_libdata_operation( - C, op->reports, scene, soops, &soops->tree, id_override_library_cb, NULL); - ED_undo_push(C, "Overridden Data"); - } + /* make local */ + outliner_do_libdata_operation( + C, op->reports, scene, soops, &soops->tree, id_override_library_cb, NULL); + ED_undo_push(C, "Overridden Data"); break; } case OUTLINER_IDOP_SINGLE: { |