Python Code to Select Existing Kernel in Maya Octane

Autodesk Maya (Plugin developed by JimStar)

Moderator: JimStar

Post Reply
jmilton
Licensed Customer
Posts: 29
Joined: Sun Sep 30, 2018 7:39 pm

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")
BK
OctaneRender Team
Posts: 1436
Joined: Mon Oct 31, 2016 7:54 pm

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
Kind Regards

bk3d
Post Reply

Return to “Autodesk Maya”