Using the node editor via Python

Sub forum for help and tutorials.

Moderators: ChrisHekman, aoktar

Post Reply
kedz
Licensed Customer
Posts: 4
Joined: Wed Mar 08, 2017 12:00 am

Hello,

I noticed there's no official Python SDK for Octane so I'm having a little trouble accessing some things. Basically, I've managed to create a diffuse material and add some image inputs, but now I need to actually use the node editor and create some nodes to adjust the images a little before connecting to the material input.
Is it possible to access the node editor, add & edit nodes via Python?

Thanks in advance! :)
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

There's not any different way as using nodes in node editor. They will be shown when you create any nodes by default ways. There's some scripts in this topic for creating the octane nodes. Ids is visible by dropping any parameters or nodes to python editor.
viewtopic.php?f=87&t=56039
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
kedz
Licensed Customer
Posts: 4
Joined: Wed Mar 08, 2017 12:00 am

aoktar wrote:There's not any different way as using nodes in node editor. They will be shown when you create any nodes by default ways. There's some scripts in this topic for creating the octane nodes. Ids is visible by dropping any parameters or nodes to python editor.
viewtopic.php?f=87&t=56039
Hi!

I've went through each code of this thread a couple times and couldn't find any code that utilizes the node editor. I'm not quite sure how to load the node group (node setup) of a material into a variable, and then insert nodes via that variable.

Thanks for your time :)
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

Again, there's not any special command or functioning for node editor. Node editor will display what you do with material editor.
What are you trying to obtain?
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
kedz
Licensed Customer
Posts: 4
Joined: Wed Mar 08, 2017 12:00 am

aoktar wrote:Again, there's not any special command or functioning for node editor. Node editor will display what you do with material editor.
What are you trying to obtain?
I have 4 textures (Diffuse, Normal & Metallic & Roughness) and a material name. I wanna create a material with PBR setup through node editor with python. and it's important that's via node editor because I want to add more nodes later between the textures and the material input.
TonyBoy
Licensed Customer
Posts: 238
Joined: Thu Dec 13, 2012 4:47 pm

Might be easier to stitch the changes together in a video editor.
kedz
Licensed Customer
Posts: 4
Joined: Wed Mar 08, 2017 12:00 am

TonyBoy wrote:Might be easier to stitch the changes together in a video editor.
This is something I can't and rather not do via video editing. I've made a custom file format with an exporter for an external program, that contains mesh, material & image data inside it. I've made a c4d plugin that reads the file and creates the mesh and now I'm working on the materials. Unfortunately, just plugging the images into the file input is not enough, I really need to create a certain node setup for those materials, and since we're talking over 300 models, doing this by hand is not what I'm looking for.
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

I believe I cannot explain it well!
You don't need to try any special ways about node editor. Node editor is a transparent interface to display native storage and connection of material+texture setups of C4D system. Not like a xpresso interface. You only need to know how to connect and create nodes in C4D way.
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
Post Reply

Return to “Help / Tutorials”