__init__.py 文件源码

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

项目:CryExport 作者: britalmeida 项目源码 文件源码
def save_file(operator, context, filepath="", use_selection=False, **kwargs):

    print('CryEngine export starting... %r' % filepath)
    start_time = time.process_time()
    try:
        file = open(filepath, "w", encoding="utf8", newline="\n")
    except:
        import traceback
        traceback.print_exc()
        operator.report({'ERROR'}, "Couldn't open file %r" % filepath)
        return {'CANCELLED'}

    fw = file.write

    fw('hello')

    file.close()

    # copy all collected files.
    #bpy_extras.io_utils.path_reference_copy(copy_set)

    print('export finished in %.4f sec.' % (time.process_time() - start_time))
    return {'FINISHED'}


# UI ##########################################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号