Right now, we have objects with 4 or 5 materials. When we want to apply a “ghost” material to these objects, we currently need to override all the materials on the object with the “ghost” material.
What we’d really like is a way that we could use the “Set Material” action in the Blueprint graph to set them all.
This is especially true since our actor has about a dozen different components inside it, and setting 4 materials on each of 12 components gets out of hand fast.
Unfortunately, there doesn’t seem to be a way to set the “Element Index” to something other than a single constant value, and it doesn’t accept multiple “Make Literal Int” functions as inputs.
I’ve also tried making a custom “Set All Materials” function in Blueprint that will accept a PrimitiveComponent input and a MaterialInterface input, so I can replace all the “Set Material” actions with my custom function. It looks like this:
Unfortunately, I am seeing that the PrimitiveComponent input pin will only accept ONE input, meaning I can’t connect all 12 of my components to this function the way I can with “Set Material.”
There also seems to be a default “Target” input pin on this function when I place it, but trying to connect any of my components to it gives me the floating popup message "Object ‘StaticMeshComponent’ is not compatible with object ‘self’ "
Any ideas?