# Setting Static Switch parameters of a Material Instance in Python

**URL:** <https://forums.unrealengine.com/t/setting-static-switch-parameters-of-a-material-instance-in-python/136415>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [January 13, 2020, 1:29pm UTC](https://forums.unrealengine.com/t/setting-static-switch-parameters-of-a-material-instance-in-python/136415 "2020-01-13T13:29:34Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![YuBeDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YuBeDev](https://forums.unrealengine.com/u/YuBeDev)\
**Post date:** [December 29, 2023, 7:38pm UTC](https://forums.unrealengine.com/t/setting-static-switch-parameters-of-a-material-instance-in-python/136415/12 "2023-12-29T19:38:16Z")

</div>

Found workaround. Use LERP function and pass it scalar hard 0 or 1, then you can use set scalar from python. Would work for something like replacement to “isMetallic?” bool or “isAlpha?”. Might not be suitable for all applications tho.  
Original: [controlling a StaticSwitch with a Float/Scalar/Constant 1 in a Material - #2 by Lovecraft\_K](https://forums.unrealengine.com/t/controlling-a-staticswitch-with-a-float-scalar-constant-1-in-a-material/299743/2)

---

_[View the full topic](https://forums.unrealengine.com/t/setting-static-switch-parameters-of-a-material-instance-in-python/136415)._
