我被困在 Arnold 的 Python 命令列表中。对于当前的这个练习,我需要在 Maya 中制作一个光绘(例如https://evermotion.org/articles/show/8837/light-painter-1-0)。
我需要让它自动打开 ArnoldRenderView。我一直在寻找这个很长一段时间了。我所能找到的只是这个:“ from mtoa.cmds.arnoldRenderView import arnoldRenderView
”。
在哪里可以找到可以用来打开 ArnoldRenderView 的标志(通过单击按钮)?
或者有没有更简单的方法来打开 ArnoldRenderView 而不访问“ mtoa.cmds.arnoldRenderView
”?
亲切的问候,里克。
编辑:我在玛雅 (Python) 中为 arnold 找到了两个有用的脚本链接:https : //arnoldsupport.com/2015/03/04/arnold-getting-started-with-the-arnold-python-api/和https ://trac.solidangle.com/arnoldpedia/chrome/site/Arnold-4.1.3.3/doc/api/index.html
我已经找到了我的问题的答案。
# import libraries (Maya Commands Library and mtoa Core Library)
import maya.cmds as cmds
import mtoa.core as core
就像 haggi krey 说的,你会在arnoldmenu.py
文件中找到必要的功能
#Copy paste both functions from the arnoldmenu.py Script (filepath: "C:\solidangle\mtoadeploy\2018\scripts\mtoa\ui\arnoldmenu.py")
def arnoldOpenMtoARenderView():
core.createOptions()
cmds.arnoldRenderView(mode ="open")
def arnoldMtoARenderView():
# core.ACTIVE_CAMERA is not set, anything we could do here ?
#if core.ACTIVE_CAMERA != None:
# cmds.arnoldRenderView(cam=core.ACTIVE_CAMERA)
# so instead we're calling it without any argument
core.createOptions()
cmds.arnoldRenderView()
#execute both functions
arnoldOpenMtoARenderView()
arnoldMtoARenderView()
此脚本以与您上次关闭它相同的状态打开 arnoldRenderView。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句