From 562f847e8685a61b0459ef39bd2bcd3ac9ead537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8D=E4=B9=8B=E5=B9=BB=E7=81=B5?= Date: Sun, 19 Dec 2021 03:49:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main.py | 6 ++++++ 2 files changed, 66 insertions(+) create mode 100644 build.py diff --git a/build.py b/build.py new file mode 100644 index 0000000..ba40ac0 --- /dev/null +++ b/build.py @@ -0,0 +1,60 @@ +# -*-coding:utf-8 -*- +u""" +:创建时间: 2021/12/19 3:40 +:作者: 苍之幻灵 +:我的主页: https://cpcgskill.com +:QQ: 2921251087 +:爱发电: https://afdian.net/@Phantom_of_the_Cang +:aboutcg: https://www.aboutcg.org/teacher/54335 +:bilibili: https://space.bilibili.com/351598127 + +""" +from __future__ import unicode_literals, print_function + +# 因为是将库放在C:\Users\PC\Documents\maya\scripts下的所以需要初始化maya +try: + import maya.standalone + + maya.standalone.initialize() +except: + pass + +import CPCLI.core as cli_core +from CPCLI.overall_processing_function import group +from CPCLI.file_filtering_functions import noTypes +from CPCLI.processing_function import deleteBlankLines, deleteUselessStrings + + +class Config(object): + # 文件过滤函数 + file_filtering_functions = [ + noTypes(['pyc']) + ] + # 整体处理函数 + overall_processing_function = [ + group( + name=u"DG_EDITOR_0_1_0", + exec_script=u'''\ +import main +from main import main +main()''' + ) + ] + # 处理函数 + processing_function = [ + # 清除空行 + deleteBlankLines, + # 清除无用字符串 + deleteUselessStrings + ] + # 可真可假影响不大 + debug = True + + class Path(object): + root = r"D:\dev\python_for_maya\tool\dg_editor" + src = root + r"\src" + scripts = root + r"\script" + build = root + r"\build" + + +cli_core.build(Config) \ No newline at end of file diff --git a/src/main.py b/src/main.py index 2325091..c911ba4 100644 --- a/src/main.py +++ b/src/main.py @@ -10,3 +10,9 @@ """ # 作为启动模块 +import init +import main_window + + +def main(): + return main_window.new()