Q100091: Rendering multiple frames in Katana GUI mode



This article describes how to render multiple frames in Katana via Python.


Rendering multiple frames within the Katana UI is not currently supported and the recommended workflow for this is rendering in batch mode. Within a batch render command you can use the '-t' argument to specify the frame range for your project render.

That being said, it is currently possible to trigger a render within the Katana UI via Python. This can be done using the following example on an existing project or using the KatanaFile.Load(yourKatanaScene) command to load the project as part of the Python execution:

import NodegraphAPI
from Katana import KatanaFile
from Katana import RenderManager
def messageHandler( sequenceID, message ):

RenderNode = NodegraphAPI.GetNode('Render') # Getting Render node
renderSettings = RenderManager.RenderingSettings()
RenderManager.StartRender('diskRender', node=RenderNode, settings=renderSettings)

The StartRender command only supports rendering one frame at a time, however, you can render multiple frames by iterating through your frame range and executing new StartRender commands each time. This allows you to render the full desired frame range in UI mode.

To do this you need to replace the following command

RenderManager.StartRender('diskRender', node=RenderNode, settings=renderSettings)
with a loop through command like:

for frame in range(1, 6):
   print('-' * 80)
   print('\nRendering Node "%s" frame %s...' % (RenderNode.getName(), frame))
    renderSettings.frame = frame
    RenderManager.StartRender('diskRender', node=RenderNode, settings=renderSettings)


NOTE:  If you are looking to modify the Katana project before launching your render in 'batch' mode, then you can use the above information to create a Python script that you would launch Katana with, via 'script' mode.



To render multiple frames outside of the GUI or via a render farm, you can use the Katana batch mode or Katana Queue. More information and example commands are included in the Katana Online Help under the Rendering Your Scene > Batch Rendering section. For more information on Katana Queue please visit Rendering a Scene > Katana Queue on the Developer Guide.

    We're sorry to hear that

    Please tell us why