Using the node editor via Python

Forums: Using the node editor via Python
Sub forum for help and tutorials.

Moderator: aoktar

Using the node editor via Python

Postby kedz » Sat Jun 08, 2019 12:39 am

kedz Sat Jun 08, 2019 12:39 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! :)
kedz
Licensed Customer
Licensed Customer
 
Posts: 4
Joined: Wed Mar 08, 2017 12:00 am

Re: Using the node editor via Python

Postby aoktar » Sat Jun 08, 2019 1:03 am

aoktar Sat Jun 08, 2019 1:03 am
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
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15967
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Re: Using the node editor via Python

Postby kedz » Sat Jun 08, 2019 1:28 am

kedz Sat Jun 08, 2019 1:28 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 :)
kedz
Licensed Customer
Licensed Customer
 
Posts: 4
Joined: Wed Mar 08, 2017 12:00 am

Re: Using the node editor via Python

Postby aoktar » Sat Jun 08, 2019 1:49 am

aoktar Sat Jun 08, 2019 1:49 am
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
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15967
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Re: Using the node editor via Python

Postby kedz » Sat Jun 08, 2019 1:59 am

kedz Sat Jun 08, 2019 1:59 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.
kedz
Licensed Customer
Licensed Customer
 
Posts: 4
Joined: Wed Mar 08, 2017 12:00 am

Re: Using the node editor via Python

Postby TonyBoy » Sat Jun 08, 2019 10:02 pm

TonyBoy Sat Jun 08, 2019 10:02 pm
Might be easier to stitch the changes together in a video editor.
TonyBoy
Licensed Customer
Licensed Customer
 
Posts: 238
Joined: Thu Dec 13, 2012 4:47 pm

Re: Using the node editor via Python

Postby kedz » Sun Jun 09, 2019 1:47 pm

kedz Sun Jun 09, 2019 1:47 pm
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.
kedz
Licensed Customer
Licensed Customer
 
Posts: 4
Joined: Wed Mar 08, 2017 12:00 am

Re: Using the node editor via Python

Postby aoktar » Sun Jun 09, 2019 3:02 pm

aoktar Sun Jun 09, 2019 3:02 pm
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
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15967
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Return to Help / Tutorials


Who is online

Users browsing this forum: No registered users and 7 guests

Wed Apr 24, 2024 2:58 pm [ UTC ]