# Set a constanst material instance shading model override via python

**URL:** <https://forums.unrealengine.com/t/set-a-constanst-material-instance-shading-model-override-via-python/1145462>\
**Category:** Editor Scripting\
**Tags:** unreal-engine, question\
**Created:** [April 26, 2023, 8:41pm UTC](https://forums.unrealengine.com/t/set-a-constanst-material-instance-shading-model-override-via-python/1145462 "2023-04-26T20:41:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bayhemvr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bayhemvr](https://forums.unrealengine.com/u/bayhemvr)\
**Post date:** [April 26, 2023, 8:41pm UTC](https://forums.unrealengine.com/t/set-a-constanst-material-instance-shading-model-override-via-python/1145462/1 "2023-04-26T20:41:34Z")

</div>

Hi! I’m looking for python code that will allow me to change the shading model of a material instance. I see you can change quite a bit through MaterialEditingLibrary, but I don’t see option for the overrides shading model or blend mode.

---

<div class="post-metadata">

**Author:** ![willeb2020](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@willeb2020](https://forums.unrealengine.com/u/willeb2020)\
**Post date:** [April 1, 2024, 5:45am UTC](https://forums.unrealengine.com/t/set-a-constanst-material-instance-shading-model-override-via-python/1145462/2 "2024-04-01T05:45:38Z")

</div>

Hello. I am also looking for a solution to this. Did you have any luck?

---

<div class="post-metadata">

**Author:** ![DW\_MaxR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DW\_MaxR](https://forums.unrealengine.com/u/DW_MaxR)\
**Post date:** [November 12, 2024, 4:13pm UTC](https://forums.unrealengine.com/t/set-a-constanst-material-instance-shading-model-override-via-python/1145462/3 "2024-11-12T16:13:01Z")

</div>

Hello!

I was searching for the same thing, and finally figured it out:  
This parameter is on the MaterialInstanceConstant directly, not a procedural parameter depending on the master material like the MaterialEditingLibrary access.  
It is located in the base\_property\_overrides property of the MaterialInstanceConstant:  
unreal.MaterialInstanceConstant.base\_property\_overrides.shading\_model  
along with the toggle:  
unreal.MaterialInstanceConstant.base\_property\_overrides.override\_shading\_model

Access needs to be done with the usual get\_editor\_property…

Hope this can help others wondering!
