用于渲染vray的Python命令

时间:2014-05-22 18:45:22

标签: python render maya mel pymel

制作一个小脚本为我写出.vrscenes,但是我有点坚持让它们渲染。

我正在使用pymel render命令,它似乎调用了maya软件渲染器而不是自己忽略了我设置的所有渲染。有人知道是否有替代命令?

谢谢,对不起,如果之前有人询问过这个问题!

脚本如下;

frames = 100
split = 1
location = "/Users/adamcheshire/Desktop/testing/testScene"

# Create a list of render frames evenly split

framesToRender =  frames/split
listToRender = []
start = 1
end = framesToRender

for i in range(0, split):
    listToRender.append([start, end])
    start += framesToRender
    end += framesToRender

# Make sure final element == to frames

listToRender[-1] = [listToRender[-1][0], frames]


# init vrscene mode

vray = pm.ls('vraySettings')[0]
DRG = pm.ls('defaultRenderGlobals')[0]

vray.vrscene_render_on.set(0)
vray.vrscene_on.set(1)
DRG.animation.set(1)
vray.animBatchOnly.set(0)

# Set and Render

for i in range(0, len(listToRender)):
    DRG.startFrame.set(listToRender[i][0])
    DRG.endFrame.set(listToRender[i][1])
    vray.vrscene_filename.set(location+"_s"+str(listToRender[i][0])+"_e"+str(listToRender[i][1])+".vrscene")
    pm.render()
    #pm.batchRender()

1 个答案:

答案 0 :(得分:0)

我认为它类似于:

pm.vrend()