def get_selected_faces_by_sel_seq(obj):
"""
get information about selected indices.
@param obj object
@return information about selected faces (list of SelectedFaceInfo)
"""
# get indices by selection sequence
bm = bmesh.from_edit_mesh(obj.data)
if check_version(2, 73, 0) >= 0:
bm.faces.ensure_lookup_table()
indices = [
e.loops[0].face.index
for e in bm.select_history
if isinstance(e, bmesh.types.BMFace) and e.select]
# get selected faces by selection sequence
return get_faces_from_indices(obj, indices)
评论列表
文章目录