Exploding Blocks and losing the "by parent" properties

I have a series of blocks on a facade, they are 10 different kinds representing 10 different panels types, these repeat by the hundreds across the facade.

As I wanted to apply the color materiality randomly regardless of the type of block, I’m using material “by parent” inside the block and it works perfectly… except when i need to explode the blocks to export the model to my rendering software, then the panel material goes back to the material of the layer in which they are inside the block, and hence losing the “by parent” assigned material.

Is there a way to keep their material assigned by parent after exploding? I’m currently selecting by material then exploding that group of panels with such material, then reassigning the material, and this has to be done 10 times. It it an annoying process to do this every time the is an iteration on the design and have to re-export.

Thanks,

J

Hi J,

I don’t think there is a way in Rhino to do it via regular commands.
You can try this script - it should help with keeping the materials of ByParent objects in Blocks to remain unchanged after exploding the blocks:
ExplodeBlocksAndKeepByParentMaterial.rvb (2.5 KB)

hth,

–jarek

This works perfect thanks Jarek! Legend!