How to change render model in code

This but actually works:
image