简体   繁体   English

使用Python在Maya中“渲染当前帧”

[英]“Render Current Frame” in Maya with Python

How can I use pymel, or just python in general, to render the current frame with whatever settings are given? 如何使用pymel或一般来说仅使用python来渲染具有指定设置的当前帧?

I've looked into pymel.core.rendering, but all I can find are render specific commands. 我已经研究了pymel.core.rendering,但我只能找到特定于渲染的命令。 I tried the basic cmds.render() but it didn't do anything. 我尝试了基本的cmds.render(),但没有执行任何操作。

I basically want the same functionality as the "Render Current Frame"-Button at the top of the UI - that it renders the currently active view with whatever the settings are. 我基本上想要与UI顶部的“渲染当前帧”按钮相同的功能-无论设置如何,它都可以渲染当前活动的视图。

I hope you can help me! 我希望你能帮帮我!

I figured it out by looking at the script editor. 我通过查看脚本编辑器了解了这一点。 It's within the runtime module. 它在运行时模块中。 So for anyone else with this problem, the command is: 因此,对于任何其他有此问题的人,该命令为:

pymel.Core.runtime.RenderIntoNewWindow() pymel.Core.runtime.RenderIntoNewWindow()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM