hi there,
I am pretty new to scripting the editor (and unreal in general). Hopefully this is a quick question someone can help me with.
I am trying to get/set a number of different parameters on a layered material instance using python (change color, swap textures, etc). The issue is that the instance shares a number of material layers and blends, so if I list the instance’s texture parameters by name, I get a huge number of duplicates and cant tell which layer they are from.
How can I get/set these with respect to the layer they are in?
Me and my team are working with layered materials, creating a nice library of tileable mats.
From time to time we have to refactor some of the core shaders, rename parameters or move them to a different place so performance and usability is improved.
I wanted to create a tool in python that helps with this, but I have found myself hitting a wall. I am able to retrieve all the different parameters, with their layer index, if they belong to a layer or a blend and so on.
but what about booleans or static switch params? I am not currently able to get those values at all.
What about the checkbox that enables the parameter? It will be really useful to be able to gather that data as well
But the most important part, it seems that no function from the MaterialEditingLibrary or dealing with the material classes itself it is impossible to change a parameter value that is located in a layer or a blend. It only works for the GLOBAL parameters…
It also would be nice to be able to count the amount of layers being used by a material, being able to distinguish if a layer is disabled or not…
Did you achieve something with your topic that could help?
i got the same problem, only way to set layer parameters is using dynamic material intance with material parameter info… there is no layer access on material instance constant… dang!