1

When you click the "use nodes" button, the Principled BSDF node appears in the shader editor connected to the output node, and the properties of the Principled BSDF node appear in the Properties panel.

enter image description here

(a)I want to create a button like "use nodes" button that does this, but instead of adding a Principled BSDF node, your material node tree you have created will be added

(b) the properties of each node in the material will appear in the Properties panel.

How do I do this with Python? And is there a difference between eevee and cycles when I do this? I hope that the answer will be as I want and detailed as I am a beginner in programming

egycno
  • 23
  • 6
  • 1
    What's the reason for this? Will result in a long list which most likely is hard to manage for the user (essentially the reason why we are using nodes). I recommend create a node group and a button to create it, which can be managed from the Material Properties as well as from the Item tab in the node editor... no difference as long as all nodes you're using supported by both engines... – brockmann Aug 09 '20 at 04:15
  • https://blender.stackexchange.com/questions/169287/how-to-assign-a-material-to-a-mesh-object-with-python – batFINGER Aug 09 '20 at 10:13
  • 1
    To use the material that I created which contains a set of nodes and properties that I created earlier, instead of re-creating it, as I use it in most of my projects, so I intend to permanently replace Principled BSDF node with the node tree of my material or user material and control the properties of each node in Properties panel with the Principled BSDF node remaining inside the blender (I don't want to use the "append" option) This is only part of my own project, and I'll be making other improvements to it later, but this is what I need at the moment. – egycno Aug 09 '20 at 12:16
  • 1
    if you have any details or code created earlier edit into question. AFAIC prior link posted answers most of this. The use nodes button is a material property when set to True adds a default nodetree if none exist prior for that material. If I read it correctly you basically want to assign to your material (or a copy of) instead. Related https://blender.stackexchange.com/questions/98294/custom-default-settings-for-nodes-materials – batFINGER Aug 09 '20 at 13:34
  • Please take your time and read my comment again. (a) create a new operator - explained in the link batFINGER posted (b) doesn't make any sense - node group? – brockmann Aug 09 '20 at 20:34
  • In (a) I mean that I want to change the default material so that when I click the "New material" button, the nodes tree for my material appears as the default material permanently. As for (b), after using Blender more than once, I discovered that it already contains what I want, as it displays the properties of each node associated with the main node, sorry for this big mistake. So, my question now is how do I change the default material in Blender in two ways: 1-Via Python 2- Without Python (without programming) – egycno Aug 10 '20 at 11:39
  • No one will answer me? – egycno Aug 15 '20 at 03:07

0 Answers0