Node Materials & Python ?
-
Hi,
I didn't really find a good post about it...
Is it possible to modify / create Node Materials with Python ?Is there maybe an example somewhere how to
- add/remove a color shader to/from the diffuse slot
- select an existing color shader and change its value
best, index
-
Hello @indexofrefraction,
Thank you for reaching out to us. The short answer is, yes, this is possible.
The Nodes API is however still not truly finalized, even on C++, and we have not put much effort in the documenation of the Python bindings of the Nodes API. But @m_adam did already create quite extensive bindings for Nodes API in Python. The technical documenation of the work done is reflected in the graph and nodespace frameworks in the Python frameworks overview.
You will be able to create and modify nodes, but some of the more complex things in the Nodes API are not documented or not yet possible in Python. @m_magalhaes wrote a set of example scripts which you can find here. I would propose that you try to get as far as you can get and then come back to this thread with your questions (you do not have to open multiple threads in this case) and I will help you.
I could line out problems you might encounter, but it is simpler if you just tell us what you want to do specifically, or simply encounter them yourself and then ask here.
Cheers,
Ferdinand -
thanks ferdinand... something to study when this summer heat is over .-)