Python Code to Select Existing Kernel in Maya Octane

Forums: Python Code to Select Existing Kernel in Maya Octane
Autodesk Maya (Plugin developed by JimStar)

Moderator: JimStar

Python Code to Select Existing Kernel in Maya Octane

Postby jmilton » Tue Aug 02, 2022 1:05 am

jmilton Tue Aug 02, 2022 1:05 am
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")
jmilton
Licensed Customer
Licensed Customer
 
Posts: 29
Joined: Sun Sep 30, 2018 7:39 pm

Re: Python Code to Select Existing Kernel in Maya Octane

Postby BK » Tue Aug 09, 2022 4:02 am

BK Tue Aug 09, 2022 4:02 am
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
BK
OctaneRender Team
OctaneRender Team
 
Posts: 1320
Joined: Mon Oct 31, 2016 7:54 pm

Return to Autodesk Maya


Who is online

Users browsing this forum: No registered users and 8 guests

Fri Apr 19, 2024 5:37 am [ UTC ]