Maya

主要提供了调用maya分析工具对maya资源进行相关配置文件的分析, 分析的结果保存为本地json文件,在分析的过程中会对用户传入的初始 配置信息进行校验,校验合格才开始进行文件分析。

A interface for maya.

class rayvision_maya.analyze_maya_handle.Maya(*args, **kwargs)

基类:rayvision_utils.json_handle.JsonHandle

Inherit JsonHandle.

Mainly responsible for the processing before and after analysis.

analyse()

Build a cmd command to perform an analysis scenario.

Raises:AnalyseFailError -- Analysis scenario failed.
analyse_cg_file()

Analyse cg file.

Analyze the scene file to get the path to the startup file of the CG software.

static check_version2(cg_file)

Check the CG version of the scene file when it is Python2.

参数:cg_file (str) -- Scene file path.
返回:
Make the CG version of the scene file.
e.g.:
"2018".
返回类型:str
static check_version3(cg_file)

Check the CG version of the scene file when it is Python3.

参数:cg_file (str) -- Scene file path.
返回:
Make the CG version of the scene file.
e.g.:
"2018".
返回类型:str
find_location()

Get the path where the local Maya startup file is located.

Raises:CGExeNotExistError -- The path to the startup file does not exist.
handle_analyse_result()

Handle analyse result.

Save the analyzed scene file information and texture information to the upload.json file.

init()

Check if the scene file name has Chinese.

Raises:FileNameContainsChineseError -- Scene file name has Chinese.
location_from_reg(version)

Get the path in the registry of the local CG.

When the system environment is Windows or linux, get the path where the local Maya startup file is located in the registry.

参数:version (str) --

Maya version. e.g.:

"2018".
返回:
The path where Maya's startup files are located.
e.g.:
"D:/Maya/Maya2018/".
返回类型:str
run()

Perform an overall analysis process.

valid()

Check version.

Check whether the version of the scene file is consistent with the configured version.

Raises:VersionNotMatchError -- Version does not match.