Git Product home page Git Product logo

cpcli's Introduction

CPCLI

苍之幻灵-脚手架

目录

快速开始

如果你的Maya有pip那么

cd "C:\Program Files\Autodesk\Maya2018\bin"
mayapy -m pip install CP_CLI

如果没有

  1. 打开C:\Users\PC\Documents\maya文件夹
  2. 进入scripts文件夹,如果没有就创建它
  3. 下载完整的CPCLI代码
  4. 解压并进入解压完成的文件夹
  5. 将src目录中的CPCLI文件夹复制到scripts
  6. 打开maya2018,如果已经打开了就重启它

创建test.py并添加以下代码

#!/usr/bin/python
# -*-coding:utf-8 -*-
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"TOOL_NAME",
            exec_script=u'''\
# 以下是启动脚本
import main
from main import main
main()'''
        )
    ]
    # 处理函数
    processing_function = [
        # 清除空行
        deleteBlankLines,
        # 清除无用字符串
        deleteUselessStrings
    ]
    # 可真可假影响不大
    debug = True

    class Path(object):
        root = r"项目根目录"
        src = root + r"\src"
        scripts = root + r"\scripts"
        build = root + r"\build"


cli_core.build(Config)

版权说明

该项目签署了Apache-2.0 授权许可,详情请参阅 LICENSE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.