1 Star 0 Fork 0

HandierChan / MayaExecuteMel

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

简介

测试环境:win10, python3.9, maya2018

用 python 执行 cmd 来把 maya 文件(*.ma *.mb)导出成 alembic 文件(*.abc)

说明

  1. 此脚本导出文件的格式,比如导出abc是 {###.abc},所以mel里面不要有冲突关键符" {###. "
  2. 直接执行mel,记得最后加上" file -s; "

代码解释

mayaGUI(mel):

AbcExport -j "-file z:/a.abc";

windows(cmd):

mayabatch.exe -file z:/a.ma -command "AbcExport -j \"-file z:/a.abc\";"

python:

mayaFile = 'z:/a.ma'
commandLine = 'mayabatch.exe -file '+mayaFile+' -command '+'"AbcExport -j \\"-file z:/a.abc\\";"'
os.system(commandLine)

Comments ( 0 )

Sign in for post a comment

About

用python执行cmd来把maya导出成abc spread retract
Python
Cancel

Releases (1)

All

Contributors

All

Activities

load more
can not load any more
Python
1
https://gitee.com/handierchan/MayaExecuteMel.git
git@gitee.com:handierchan/MayaExecuteMel.git
handierchan
MayaExecuteMel
MayaExecuteMel
master

Search

010926 d3736ce6 1850385 010927 f77ebe53 1850385