setColor over part of a model [Solved]

I want to have a car in different colors. I have a car model where there is a car_body group that I can assign a texture without messing with tyres, glass and other car parts.


That’s ok and I can work just with that.

Since I like to make things the more simple it’s possible, I think it would be better just to setColor like this:
BLACK = Vec4(0,0,0,1)
WHITE = Vec4(1,1,1,1)


But it doesn’t work, the car body looks uncolored and untextured (the rest of the car its fine)

Any help with this problem?


car.find('**/Car_body').setColor(BLACK, 1)

The second parameter is a priority override, and is necessary to override the implicit white color you already have on your vertices.


Wow, This was a fast reply :smiley: Well, in a first try the priority override didn’t change a thing, but it made me to think if maybe there was some material involved screwing the whole thing. Indeed it was, so when I removed it, it looked as expected.

Thanks one more time David, the Panda Forums magician.