set color of node

i’m trying to set the color of the node (see code) but it wont work… i’ve also try it on the model but with no resoult…
is something wrong here?

quadsHolder = []
mainHolderNode = render.attachNewNode("mainHolder")
#mainHolderNode.setPos(-4, 0, -3)

def setQuads():
	for i in range(8):
		for j in range(6):
			tempModelNode = mainHolderNode.attachNewNode("modelHolder")
			tempModelNode.setPos(i*1.1, 0, j*1.1)
			tempModelNode.setColor(1, 0.5, 0.5, 1)
			tempModel = loader.loadModel("primitives/cube.egg")
			tempModel.setColor(1, 0.5, 0.5, 1)

i’m on osx using openGL

try nodepath.setColorScale instead of setColor. Set color sets a specific color in the texture to that and color scale “tints” the model by that color.

it’s working :slight_smile:

For the record, setColor() would also work, but you need to apply a fifth parameter, which is the override setting. If this fifth parameter is omitted or 0, it won’t replace the color on an existing model.