Ah. This egg file has a Material on it, and the material defines an explicit diffuse color. With a Material in effect, and lighting enabled, the Material’s diffuse color overrides the object’s color, so setColor() has no visible effect.
You can either find a handle to the Material and modify that (or create a new Material that has the desired color), or you can edit the egg file to remove the “diffr”, “diffg”, and “diffb” entries from the Material, which are the same as the RGBA of the polygon anyway. With the diffuse color specification removed, the polygon color of the model will show through, and you’ll be able to setColor() on the model as expected.
I have an object that had a material already (from the modeling package). I “overroad” that material by making a Panda Material and setting it on the object.
I then wrote code to manipulate the Material in hopes of making the material get really dark or really light.
Once you have applied a material to an object, it’s too late to change the material properties and expect them to show up reliably. However, you can make a copy of the material, change the properties of the copy, then re-apply the copy to the object. (This is, of course, impossible to do once the object has been flattened away with flattenStrong().)
If an object does not have a material, or if the material it does have does not override the diffuse color, then you may change the object’s color at runtime with setColor() or setColorScale(). (This is also impossible once you have called flattenStrong().)
Note that a material is used for lighting effects; it isn’t necessarily related to shaders.