Textures,get the material onto which certain texture is binded to

Hi guys.

Is it possible to get the parent material of the texture which contains that texture.

So I am looping through textures, and I need something like texture.getParentMaterial.

Also is it possible to detect if there are textures in the scene which don’t have binded material (I guess if the first one is possible, this one is easy).

Thanks

You can use the Material.hasTexture() function to know if a given texture is used by a given material.

2 Likes