Page MenuHome

Python: Bmesh "from_object" broken in 2.8
Closed, ResolvedPublic


Win 10
Gtx 980

Blender 2.8

Creating a bmesh object using from_object used to work in 2.79 but is broken in 2.8

  • Run the following code in the script editor
import bpy, bmesh
bm =
  • It returns the error:
SystemError: <method 'from_object' of 'BMesh' objects> returned NULL without setting an error

Event Timeline

This looks similar to error I got in Except there it was bvhtree.fromObject that was broken.

Philipp Oeser (lichtwerk) claimed this task.
Philipp Oeser (lichtwerk) triaged this task as Confirmed, Medium priority.

Confirmed. Will have a look tomorrow.

As a (temporary) workaround you can use

import bmesh
bm =
mesh = bpy.context.active_object.to_mesh(bpy.context.depsgraph, True)

Thank you, will try it!
I'm a little concerned by performances though, "to_mesh" creates a new mesh data block, so I thought it may be slower than the bmesh method. But maybe i'm wrong.