does anyone know, how to make a new material used in the editor the new standard material for the mesh, for a ton of meshes, all with different materials?
I just imported some meshes, that are divided into a ton of parts, and all their materials were… not useable. So i packed them into the level, changed their materials there to my liking, and now i want those materials become the new standard materials for those meshes.
Because right now, if i import those meshes into a new level/world, then of course they use their old default materials, which are still broken (and were replaced).
I just find it easier to replace those materials in the editor, ratehr than in the static mesh editor.
An example picture, where one mesh got a new material:
i am more than happy to announce, that i was able to create a solution for this ^.^ That means, as of now i am able to synchronize the materials between the meshes in the current level and their meshes in the content browser
That was made possible with a heavy modification of a script from someone else, who used a blutility to replace materials of some selected static meshes with a new user defined material.
Of course, this blutility was unable to get any info from whats happening in the current level, so i just needed to find a way to tell this blutility, what meshes are in the level, how many material slots they have, and what materials are in those slots.
Whelp, as it turned out, those blutilities have access to savegame files, so i just created a helper actor, that i can throw into the level, which then stores all the mesh names, the materials slots and the materials in some arrays and structs, and saves that into a normal savegame.
Step two is then to just select the meshes, that i want to update, and run the blutility. Now that blutility loads that created savegame, compares the names of those selected static meshes with the names found in that savegame, and if they match, it just iterates through the stored material slots and materials, and assigns them ^.^
The only small problem is, i haven´t found a way to update Datasmith actors. But for now, i am more than happy with that.
Video of a test sync:
The original blueprint for replacing materials in the content browser: