Fix T79604: Switching to edit mode on boolean object runs out of memory.
Note that this is a dummy safe fix for now, far from optimal.
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
#include "BKE_lib_query.h"
|
#include "BKE_lib_query.h"
|
||||||
#include "BKE_material.h"
|
#include "BKE_material.h"
|
||||||
#include "BKE_mesh.h"
|
#include "BKE_mesh.h"
|
||||||
|
#include "BKE_mesh_wrapper.h"
|
||||||
#include "BKE_modifier.h"
|
#include "BKE_modifier.h"
|
||||||
#include "BKE_screen.h"
|
#include "BKE_screen.h"
|
||||||
|
|
||||||
@@ -177,6 +178,9 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
|
|||||||
|
|
||||||
Object *other = bmd->object;
|
Object *other = bmd->object;
|
||||||
mesh_other = BKE_modifier_get_evaluated_mesh_from_evaluated_object(other, false);
|
mesh_other = BKE_modifier_get_evaluated_mesh_from_evaluated_object(other, false);
|
||||||
|
/* XXX This is utterly non-optimal, we may go from a bmesh to a mesh back to a bmesh!
|
||||||
|
* But for 2.90 better not try to be smart here. */
|
||||||
|
BKE_mesh_wrapper_ensure_mdata(mesh_other);
|
||||||
if (mesh_other) {
|
if (mesh_other) {
|
||||||
Object *object = ctx->object;
|
Object *object = ctx->object;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user