Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c59
1 files changed, 1 insertions, 58 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index a6eb35d49b9..57a0fe0a39d 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2334,7 +2334,7 @@ static int make_override_library_exec(bContext *C, wmOperator *op)
BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
const bool success = BKE_lib_override_library_create(
- bmain, scene, view_layer, id_root, &obact->id, NULL);
+ bmain, scene, view_layer, NULL, id_root, &obact->id, NULL);
/* Remove the instance empty from this scene, the items now have an overridden collection
* instead. */
@@ -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;
-}
-
/** \} */
/* ------------------------------------------------------------------- */