From da11e33b26b6579ef36c97de1b6fbc0eb02a0b69 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 31 May 2018 16:44:05 +0200 Subject: Cleanup: remove G.main from BKE mball code. --- source/blender/editors/object/object_add.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 5d5d1190775..38f09570aca 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1648,7 +1648,7 @@ static int convert_exec(bContext *C, wmOperator *op) if (ob->type == OB_MBALL && target == OB_MESH) { if (BKE_mball_is_basis(ob) == false) { Object *ob_basis; - ob_basis = BKE_mball_basis_find(scene, ob); + ob_basis = BKE_mball_basis_find(bmain->eval_ctx, scene, ob); if (ob_basis) { ob_basis->flag &= ~OB_DONE; } @@ -1862,7 +1862,7 @@ static int convert_exec(bContext *C, wmOperator *op) base->flag &= ~SELECT; ob->flag &= ~SELECT; - baseob = BKE_mball_basis_find(scene, ob); + baseob = BKE_mball_basis_find(bmain->eval_ctx, scene, ob); if (ob != baseob) { /* if motherball is converting it would be marked as done later */ @@ -1933,7 +1933,7 @@ static int convert_exec(bContext *C, wmOperator *op) if (ob->flag & OB_DONE) { Object *ob_basis = NULL; if (BKE_mball_is_basis(ob) || - ((ob_basis = BKE_mball_basis_find(scene, ob)) && (ob_basis->flag & OB_DONE))) + ((ob_basis = BKE_mball_basis_find(bmain->eval_ctx, scene, ob)) && (ob_basis->flag & OB_DONE))) { ED_base_object_free_and_unlink(bmain, scene, base); } -- cgit v1.2.3