I have a material blueprint that I’m trying to edit via c++.
For the example, it has TextureSample wired to BaseColor.
I added new node of UMaterialExpressionLandscapeLayerCoords and I want to wire it to UVs input of TextureSample.
How can I get the TextureSample node and not create a new one, so I can wire it to the node I created?
As far as I know, please someone correct me if I am wrong on this, Materials and Blueprints are two separate things inside Unreal Engine.
The Materials Editor is a user interface to facilitate the generation of native shader code. When you compile a material it gets optimised and wired in the rendering pipeline. After this point users don’t have access to it anymore, that is why materials are not blueprints. Although their editors are quite similar, they are two different beasts.
The only way to “modify” a material is by creating Material Parameters and modifying these parameters either via blueprints or C++ when creating a Material Instance. More information in this question.