def get_bmesh(ob=None):
'''Returns a bmesh. Works either in edit or object mode.
ob can be either an object or a mesh.'''
obm = bmesh.new()
if ob is None:
mesh = bpy.context.object.data
if 'data' in dir(ob):
mesh = ob.data
if ob.mode == 'OBJECT':
obm.from_mesh(mesh)
elif ob.mode == 'EDIT':
obm = bmesh.from_edit_mesh(mesh)
else:
mesh = ob
obm.from_mesh(mesh)
return obm
DynamicTensionMap.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录