Assign material to multiple meshes in Content Browser

select all assets

right click then select asset actions replace references

you can consolidate references and replace them

6 years later in 4.25, am I missing something or is there still no solution?

"Bulk Edit via Property Matrix" seems like the ideal solution, but not sure why ā€œMaterialā€ is one of the only missing parameters.

1 Like

Itā€™s just not a priority for the devs sadly :frowning: what Tim Hobson says directly below the selected answer.

This is amazing!
Thanks a lot for the aid.

Working on 4.25 ATM and thereā€™s an issue which can be easly fixed. Posting the solution below in case some one encounters the issue and wants to make it compatible with 4.25
Once again, great fix!

  1. Open blutility
  2. Right-click and search for ā€œGet selected assetsā€
  3. Insert and replace the node

2 Likes

The Year is now 2022. This thread was started in 2014.
Six years later I encounter the same problem - no way to change materials on multiple selected meshes? Something Unity has out of the box for years?
Is anyone from UE reading this?

9 Likes

We created a simple tool to help with that. I think you may find it useful:
Batch assign materials to selected meshes in Unreal Engine

3 Likes

pain in ā– ā– ā– . I dont be bothered to watch people show off how BP to work on materials assign on selevted meshes, all Unreal need is a simple function but seems it not gonna happen.
I just wanna the job done and less time mock around

2 Likes

You can select the meshes you want to apply material to, select the material in the content browser and drag and drop in Details->Materials->Element.

Note: if there are more than 1 Element than all the Elements will get replaced by the new material you drag and drop.

1 Like

Another option is using a Python script.

Here is what Iā€™m using

import unreal

material = unreal.load_asset('/Game/PathToYourMaterial/MAT_YourMaterial_Inst')
sm_assets_paths = unreal.EditorAssetLibrary.list_assets('/Game/PathTo/TheFolderWith/YourStaticMeshes/')
for sm_asset_path in sm_assets_paths:
  sm_asset = unreal.EditorAssetLibrary.load_asset(sm_asset_path)
  sm_asset.set_material(0, material)

If you donā€™t know the path of an asset, right click on it and select Copy Reference. This will give you something like Blueprint'/Game/StarterContent/Blueprints/Blueprint_CeilingLight.Blueprint_CeilingLight'. In this case, /Game/StarterContent/Blueprints/Blueprint_CeilingLight would be the path.

Iā€™m using 4.27, so no idea if this is applicable for UE5, but hereā€™s some info on Python scripting in the editor - Scripting the Editor using Python | Unreal Engine 4.27 Documentation

1 Like

Iā€™m trying to create a depth map by applying shaders to everything but I believe only certain assets (namely static meshes) accept the blueprint and other elements like the skydome do not. Is there a different method of applying the emissive color shader to other kinds of assets so the depth map would be complete?

I found some simple solutions:

  • Assign material from the 3D modelling software and make specific name for example: MAT_WoodenFence
  • Export to fbx
  • Create new material or material instance in UE with the same name with the exported meshes material name in the same folder as the imported meshes
  • Import the meshes in UE. In the import setting popup material tab, Choose to not import material and set the search location to local

The imported meshes will automatically searching material with the same name and assign. Works for multi materials too. Tested in UE5

1 Like

Yes ~~~it does ~~~ thank you so much ~~~:purple_heart: :pray:t2: :heart: :pray:t2: :green_heart:

Butā€¦ not change in the content browserā€¦:sob:

oh my godā€¦:rofl:

You can do it via plugin on UE Marketplace:

here is youtube video (how it works):

1 Like

I made a simple editor utility script which does this for all selected meshes and across all IDā€™s
Here you can see it in action https://twitter.com/RonanMahonArt/status/1615012346547818497

Here is the BP https://blueprintue.com/blueprint/shxsb7ys/
Requires Unrealā€™s Editor Scripting Utilities to be enabled in Plugins

4 Likes

Thanks for this, saved me countless hours of tedious work.
Well worth the purchase price.

I have tried with an actor and UE crashes with this error

Assertion failed: !Primitive->SceneProxy [File:D:\build++UE5\Sync\Engine\Source\Runtime\Renderer\Private\RendererScene.cpp] [Line: 2022] Primitive has already been added to the scene!

Does anyone know why? Is it a Bug ?

This is another fantastic example of how little Epic really cares about the quality of the product, and how they completely ignore these forums. 9 YEARS this issue has gone without any fix. Staff even responded saying ā€œitā€™s in the backlogā€ but that was like 7 years ago, and STILL no fix. We need to find a way as a community to hold Epic accountable for the quality of their product. Itā€™s amazing, they are amazing, but they appear to care too little about actually fixing bugs/UI/UX/Quality of life issues, even if theyā€™ve been reported time and time again for close to a decade. They prioritize new and awesome new features, but never actually make real fixes. Calling you out Epicā€¦ itā€™s time to start making the quality of the product a real priority. Enough is enough!

2 Likes

How can this not be a feature yet? I am about to assign 1 material to 3000 objects. Unreal Bucket worked good but it has no 5.3 version yet so now I will look at the workarounds. But here is another request to please implement this.

found a slight fix to this for anyone that might be interested; currently using 5.2. This works best on the assumption youā€™re exporting from 3D modelling software yourself, using consistent material slot names, like modular kits for example.

I imported all FBX with ā€˜create materialsā€™ on then put the put these new materials into the same content folder as the materials i wanted to replace them with (so all in a collective ā€˜matā€™ folder). I selected the two matching materials, so, ā€˜bricks_1ā€™ for example that was imported with my FBX, and ā€˜MI_bricks_1ā€™ thats an instanced version of my MM, then went to asset actions ā†’ replace references. In the pop up, you select whichever one you WANT to be assigned to your material. So I select my ā€˜MI_bricks_1ā€™, which then replaces the ā€˜bricks_1ā€™ reference across everything that uses that material.

Obviously, it only works across the board if your materials are named in uniform with each other upon export into UE. Hope that helps someone!

Hi there! If I understood your question correctly, you can select all your meshes that you want to drag material to, and assign this material at one of objectā€™s properties at right part of the screen. It should apply this material to all selected meshes