Transfer Color via script


Hey, I need to transfer many color values from one shader to another.
But I need to transfer the, I will call it the ‘Main Color’, so the value that makes it color change.
For a lambert shader it would be the ‘color’ attribute. But for some other it might be the ‘diffuse’ or something else. Is there any way to determine by script what the name of the ‘main color’ equivalent is?


No. You would have to make a list of all the possibilities, and make your script try all of them.


That would not be a big problem but how do I query the which shader I have selected? So that I know which ‘mainColor’ attribute to change? Is there a shadertype attribute?