0
$\begingroup$

I have two materials assigned to an object. I checked both materials in Material> Options> Object Color. I want to change one of the materials without affecting the other material in real time. It's similar to this, but this time it's more than one material.

import bge

cont = bge.logic.getCurrentController()
obj = cont.owner

# Material no. 1
obj.color = [ 0.0, 0.0, 0.0, 1.0]

# Material no. 2
obj.color = [ 255.0, 255.0, 255.0, 1.0]

My goal here exactly is that I have 2 color palettes alongside with 2 materials assigned for a 1 object.

$\endgroup$
4
  • $\begingroup$ Blender doesn't have a game engine nowadays. It was forked off to upbge.org some while ago so I suggest you look at the documentation there. $\endgroup$
    – John Eason
    Commented Jan 25, 2023 at 15:27
  • $\begingroup$ I forgot to mention that this is UPBGE. $\endgroup$
    – Dun
    Commented Jan 25, 2023 at 15:29
  • $\begingroup$ Questions about UPBGE are off-topic here. $\endgroup$
    – John Eason
    Commented Jan 25, 2023 at 15:30
  • $\begingroup$ Oh, ok. Thanks for letting me know. $\endgroup$
    – Dun
    Commented Jan 25, 2023 at 15:31

0

You must log in to answer this question.

Browse other questions tagged .