how do I get the list of materials in a scene (python)
I can't see it in the docs or examples
list materials
Re: list materials
Something along the line of:
(just out of my memory so syntax/names may be not totally correct)
Code: Select all
materialNames = scene.ToProperties().GetAllUniqueNames("scene.materials.")
Re: list materials
there's no GetAllUniqueNames
gets everything material relatedmaterialNames = self.scene.ToProperties().GetAllNames("scene.materials.")
Re: list materials
yes mate that's the one :
materialNames = self.scene.ToProperties().GetAllUniqueSubNames("scene.materials")