cpuv_common.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:BetterBlender 作者: bobtherobot 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号