diff options
author | Bastien Montagne <bastien@blender.org> | 2022-02-02 18:49:01 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-02-02 18:56:23 +0300 |
commit | a83fff7c6324d1a6d651409f6d7a4f4fc5364a5b (patch) | |
tree | 1c76c016664885dc4400760f2c1749717b18666b /source/blender/editors/object/object_relations.c | |
parent | f0cfa94d94c70b2410cc9e7474ebb3c6edcb2e16 (diff) |
Remove operators to manually convert proxies to liboverrides.
Now that proxy conversions if enforced, those operations are not useful
anymore.
Part of T91671.
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index ee594398f4a..57a0fe0a39d 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2419,63 +2419,6 @@ void OBJECT_OT_make_override_library(wmOperatorType *ot) ot->prop = prop; } -static bool convert_proxy_to_override_poll(bContext *C) -{ - Object *obact = CTX_data_active_object(C); - - return obact != NULL && obact->proxy != NULL; -} - -static int convert_proxy_to_override_exec(bContext *C, wmOperator *op) -{ - Main *bmain = CTX_data_main(C); - Scene *scene = CTX_data_scene(C); - ViewLayer *view_layer = CTX_data_view_layer(C); - - BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); - - Object *ob_proxy = CTX_data_active_object(C); - Object *ob_proxy_group = ob_proxy->proxy_group; - const bool is_override_instancing_object = ob_proxy_group != NULL; - - const bool success = BKE_lib_override_library_proxy_convert(bmain, scene, view_layer, ob_proxy); - - if (!success) { - BKE_reportf( - op->reports, - RPT_ERROR_INVALID_INPUT, - "Could not create a library override from proxy '%s' (might use already local data?)", - ob_proxy->id.name + 2); - return OPERATOR_CANCELLED; - } - - /* Remove the instance empty from this scene, the items now have an overridden collection - * instead. */ - if (is_override_instancing_object) { - ED_object_base_free_and_unlink(bmain, scene, ob_proxy_group); - } - - DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_BASE_FLAGS | ID_RECALC_COPY_ON_WRITE); - WM_event_add_notifier(C, NC_WINDOW, NULL); - - return OPERATOR_FINISHED; -} - -void OBJECT_OT_convert_proxy_to_override(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Convert Proxy to Override"; - ot->description = "Convert a proxy to a local library override"; - ot->idname = "OBJECT_OT_convert_proxy_to_override"; - - /* api callbacks */ - ot->exec = convert_proxy_to_override_exec; - ot->poll = convert_proxy_to_override_poll; - - /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; -} - /** \} */ /* ------------------------------------------------------------------- */ |