maya-controller-hub
maya控制器库实现
目录
快速开始
安装
注意下方的python是你的Python, 正常情况下可以直接通过python调用, 而Maya的python一般是C:\Program Files\Autodesk<Maya版本>\bin\mayapy.exe
python -m pip install maya-controller-hub
在windows下maya的安装例子
注意:
- 请将Maya路径替换为自己的。
- 请使用cmd
"C:\Program Files\Autodesk\Maya2018\bin\mayapy.exe" -m pip install maya-controller-hub
使用
例子
# -*-coding:utf-8 -*-
from __future__ import unicode_literals, print_function, division
import cpmel.cmds as cc
from rig_core.all import *
from controller_hub import ControllerHub
ctx = Ctx()
for i in range(4):
cc.mel.eval('circle -c 0 0 0 -nr 0 1 0 -sw 360 -r 1 -d 3 -ut 0 -tol 0.1 -s 8 -ch 0;')
with ControllerHub(ctx, 'your-controller-hub-path') as control_hub:
print('control_hub', control_hub)
control_hub.use_template(
'cp.cube',
[cc.new_object('nurbsCircle1')],
translate=(1, 1, 1),
color='#19448e') # 一个蓝色的正方体控制器
control_hub.use_template(
'cp.octahedron',
[cc.new_object('nurbsCircle2')],
rotate=(45, 45, 45),
color=(0.8, 0.8, 0.8)) # 一个白色的正八面体控制器
control_hub.use_template(
'cp.flower',
[cc.new_object('nurbsCircle3')],
rotate='+y',
color=(0, 0, 0)) # 一个黑色的花形控制器
control_hub.use_template(
'cp.triangle',
[cc.new_object('nurbsCircle4')],
scale=(1.5, 1.5, 1.5),
color=14) # 一个绿色的三角形控制器
版权说明
该项目签署了Apache-2.0 授权许可,详情请参阅 LICENSE
Metadata
Release files for maya-controller-hub 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| maya_controller_hub-0.1.2.tar.gz | 9.3 kB | Without provenance | Details for maya_controller_hub-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| maya_controller_hub-0.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for maya_controller_hub-0.1.2-py2.py3-none-any.whl |
Total release size: 19.1 kB
Release files / maya_controller_hub-0.1.2.tar.gz
| Download URL | maya_controller_hub-0.1.2.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cdea6971f91b78c3345712126fa8d9a3b0870c4e4168dbe35517c32d2981b13
|
|
BLAKE2b-256 checksum How to use checksums |
86acd0a1f12d97120f8f67ea0a0a5538fd7bcce8c003a854115bc7145cd987c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / maya_controller_hub-0.1.2-py2.py3-none-any.whl
| Download URL | maya_controller_hub-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7ec785d22e5222f1d608ffaa749fb92060ff8e31adbe07214be17f61877f0ab5
|
|
BLAKE2b-256 checksum How to use checksums |
56a50bd6e90c30a794005373145c11c0e0c32a84eb1f08713a0f20b619ed8649
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for maya-controller-hub 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.