material.set_diffuse_color affects many materials ?

11 February 2016 19:53
Hi guys!

I have an object ( simple cube ) with 6 materials assigned to each side.
I'm trying to change the diffuse color of a single side - the one with material name "rightm"

m_mat.set_diffuse_color(_player,  "rightm", m_rgba.from_values(1, 0, 0, 1));

The problem is, this is somehow affecting other sides of the cube as well.
Instead of just "rightm", the half of the cube becomes red.
All of the materials are named uniquely and assigned a side of the cube.

Any help would be appreciated!
Please register or log in to leave a reply.