Is it possible to do a "set material" for a specific material slot on an object?

Know how to do a set material to change the material on an object during runtime but what if your object has different material slots assigned to different vertices groups on the object? Can you set a material to a material slot?

Thank you.

Great thank you very much !! :slight_smile:

Here is a better way with only one node :slight_smile: