Search is based on keyword.
Do not search with natural language
Ex: "How do I write a new procedure?"
Script mode allows you to execute Python scripts in Katana's Python environment. Script mode requires the --script flag, followed by a single argument specifying the script you want to run. This launch mode is most useful for testing. You can import most Katana modules, and perform tasks such as loading Katana scenes, changing some parameters, and rendering.
For example, to start Katana in Script mode using a script named yourScript.py:
|1.||Open a terminal.|
|2.||Navigate to the directory where you installed Katana.|
./katana --script /yourDirectory/yourScript.py
To open a scene and start rendering from the scene's Render node, open the following Python script in Script mode:
import NodegraphAPI from Katana import KatanaFile from Katana import RenderManager def messageHandler( sequenceID, message ): print message yourKatanaScene = "/yourDirectory/yourFile.katana" KatanaFile.Load( yourKatanaScene ) # Loading scene /yourDirectory/yourFile.katana RenderNode = NodegraphAPI.GetNode('Render') # Getting Render node RenderManager.StartRender( node=RenderNode, # Starting render hotRender=True, frame = 1, asynch = False, interactive = False, asynch_renderMessageCB = messageHandler )
Sorry you didn't find this helpful
Why wasn't this helpful? (check all that apply)
Thanks for your feedback.
If you can't find what you're looking for or you have a workflow question, please try Foundry Support.
If you have any thoughts on how we can improve our learning content, please email the Documentation team using the button below.
Thanks for taking time to give us feedback.