Page 1 of 1

Python Code to Select Existing Kernel in Maya Octane

Posted: Tue Aug 02, 2022 1:05 am
by jmilton
Hi,

Does anyone have a tip on how to select an existing Kernel or Environment that I've already set up? I have Python code to create all the Render settings nodes. The following Python code sets the render to Octane but I can't find any examples of how to select the Render Settings once that's set.

Thanks,
Jeff

import maya.cmds as cmds

# Set the Render to Octane
cmds.setAttr("defaultRenderGlobals.currentRenderer", "octane", type="string")

Re: Python Code to Select Existing Kernel in Maya Octane

Posted: Tue Aug 09, 2022 4:02 am
by BK
jmilton wrote:Hi,

Does anyone have a tip on how to select an existing Kernel or Environment that I've already set up? I have Python code to create all the Render settings nodes. The following Python code sets the render to Octane but I can't find any examples of how to select the Render Settings once that's set.

Thanks,
Jeff

import maya.cmds as cmds

# Set the Render to Octane
cmds.setAttr("defaultRenderGlobals.currentRenderer", "octane", type="string")

Hi Jeff,

Sorry for the delays.
Please try the Python command below:

Code: Select all

cmds.select("octaneKernel1")
cmds.select("pOctaneSunSky1")
Please note: the Kernel and Environment names are default OFM creates!

Hope you find it useful!

cheers