from pymxs import runtime as rt
import pymxs as mx
# 设置当前帧
rt.sliderTime=i
for i in range(rt.animationRange.start, rt.animationRange.end+1):
rt.sliderTime=i
dib = rt.gw.getViewportDib()
bmp = rt.bitmap(1920, 1080,
filename=r'D:\test\test{}.png'.format(i))
rt.copy(dib, bmp)
rt.save(bmp)
rt.close(bmp)
import sys
path = [r'D:\User\Documents\3dsMax']
for i in path:
sys.path.append(i)
import cgyun.link
with cgyun.link.enable('http://riggerstankplugin.cgyun.cn:18889'):
from max_pipe.tools.ani.hud_display import playblast as hud
from max_pipe.tools.gen import ui_utils
max_main_window = ui_utils.get_main_window()
x = hud.PlayBlastWindow(max_main_window)
x.show()
from pymxs import runtime as rt
import pymxs as mx
print(1)
node = rt.getnodebyname('Camera001')
rt.render(camera=node, outputFile='D:\\s.jpg')
dib = rt.gw.getViewportDib()
rt.gw.getFocalDist()
rt.viewport.getCamera()
rt.getnodebyname('Camera001').name
rt.viewport.setCamera(rt.getnodebyname('Camera001'))