Hi, I am trying to find a way to enable and disable texture channels of a material on an object inside a game using python. However I can’t seem to yield anything straight forward from google. Does anyone know any good tutorials around? thank you very much.
Also Is there a way I can change the opacity of an entire object without having to go through every materials on it?
Thank you very much in advance and please excuse my lack of knowledge if I am not using the correct terms
Sorry but would you be able to explain this to me please
I am guessing “dummytexture” is an attribute/property you assign to the object that is to be changed and it holds the reference to a texture, but as far as I am aware .source points to the image to be used for the texture, and I am not sure what logic.grouptexture really does…
Is there any way to declare a new material base on an existing one…?
I have tried every source and documentation that I can find on google but none of them actually helped my dilemma. But I have a feeling that it must be a technique that is somewhat common and people are using it all the time, not necessarily via the videoTexture module.
logic.grouptexture is the texture source from the first object. It might be best if I made a blend for this… By the way, an easy way to implement this might be to just make (Alt-D) instance duplicates of the first object - all other objects will share the mesh, so they should all share textures. Do you want to be able to select the texture on a case-by-case process, or do you just want all the ‘secondary’ objects to share the same texture as the first, ‘base’ object?