functions.py 文件源码

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

项目:coa_tools 作者: ndee85 项目源码 文件源码
def set_view(screen,mode):
    if mode == "2D":
        active_space_data = bpy.context.space_data
        if active_space_data != None:
            if hasattr(active_space_data,"region_3d"):
                region_3d = active_space_data.region_3d
                bpy.ops.view3d.viewnumpad(type='FRONT')
                if region_3d.view_perspective != "ORTHO":
                    bpy.ops.view3d.view_persportho()  
    elif mode == "3D":
        active_space_data = bpy.context.space_data
        if active_space_data != None:
            if hasattr(active_space_data,"region_3d"):
                region_3d = active_space_data.region_3d
                if region_3d.view_perspective == "ORTHO":
                    bpy.ops.view3d.view_persportho()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号