Get Material for block

I am trying to get individual material info of objects out of a block. I tried using elefront, but the material info is not kept after exploded a block.

In the script below, I tried to find the InstanceDefinitions first, but there are not a lot I can do and I don’t understand what does the “InstanceDefinition: TestBlock (0)” mean.

Thank you for helping in advance!

Hi @hali,

maybe attached example helps. The Rhino file contains a single block which is processed by using it’s name “Block 01” as input…

BlockObjectRenderMaterials.3dm (81.3 KB)
BlockObjectRenderMaterials.gh (7.7 KB)

btw. note that object in your code is a reserved key word in Python !
_
c.

oh, yeah, I didn’t pay attention to that. Thank you @clement, I will test it and let you know.