Applying material to loaded model

I’ve got an Actor loaded that has material properties set in maya before it was egg’ed. How do I either overwrite or clear those material settings in Panda code to apply a Panda Material object to it?


Like most other properties, you can override parameters with the additional override parameter, an integer whose default value is zero. Values larger than zero will override existing properties.

model.setMaterial(myMaterial, 1)


Thanks, I tried that a little earlier but what I see is a constant flickering between the material I applied and the material that came from maya…

Perhaps you have two different models in the same space, and you only applied the material to one of them? That would cause the flickering you describe. I can’t think of anything else that would.