Bulk change Shading model to Unlit? editor utility blueprint?

I would love to automate a process so that I can change the Shading Model of selected materials to Unlit, and take the base color, and connect it to emissive.

How can I do this?

I started using Editor Utility Blueprints and was able to change certain Texture settings and static mesh settings, but couldn’t find anything to set Shading model to unlit. Can anyone help?

If it can be done through python or c++ i suppose that would work as well. thanks in advance.

1 Like

Not an expert, the only functions that seems to be exposed are the ones in the “Material Editing” library.

I have been successful in creating some expression and connecting it to a property.
But the library does not give a way to get an expression or change the shading model.

C++ is the way forward for now.

I was able to change the shading model of the material. In my case I was changing it to Subsurface. I was also creating a parameter and connecting that parameter to the subsurface color.

    mat_closure.set_editor_property("ShadingModel", unreal.MaterialShadingModel.MSM_SUBSURFACE)
    ts_node_subsurface = unreal.MaterialEditingLibrary.create_material_expression(mat_closure, unreal.MaterialExpressionScalarParameter,-125,50)
    ts_node_subsurface.set_editor_property('default_value', 0.05)
    unreal.MaterialEditingLibrary.connect_material_property(ts_node_subsurface, "", unreal.MaterialProperty.MP_SUBSURFACE_COLOR)


In your case I think you would do something similar, but use MSM_UNLIT as the shading model as shown in the doc below.