open_material_modal function

Open a material modal programmatically.