I also did that exclusively with Elefront until R8 was out
then R8 shipped with a new set of GH components that allow a very good handling of baking, updating, retrieving and filtering geometries, layers, blocks, object properties from the Rhino document
so, in short if you are on R8 I very much think you can do all those things using native R8 components from the Rhino GH tab
In addition to the docs that Andy shows, here is the Rhino 8 components throwing objects on different layers and displaying with different colors. Material could also be assigned.
As for layers, the objects can be placed on layers before putting them into the Block definition. And the inserts themselves can be put on layers by running them thru the object model component. Here are the blocks being inserted on layers named the same as the block. Made it easy:
Right, without a layer specified it makes a default one.
I like to set a panel on the cache output to check the results.
The base point is the transform input on the insert component. While a point will work, inspiring a plane will control insertion location and rotation.
Appreciate it! Now that you mention it, what would be the best way to get layer names to build upon? Basically I am copying model layer structure and rebaking to GH_Blocks and duplicate layer structure inside of it.
I managed to do it but I feel like I am using too many components and should be more straight forward?
Here is the way to do this. Not sure it is exactly the correct way as it took me a while to find it. I almost believe the Layer Name property should do this by default.
But by using the Content Details component the full path can be harvested for the layer. Also the other attributes can be found to.
But also a great way to create new layers with all the same attributes but a new name use the Duplicate Content component (under the Rhino toolbar in Grasshopper). This will create a new Model Object that matches all the attributes of the original, but without the ID.
A useful concept is if the ID is kept with the Model object and the Content Cache is used, then the Content Cache will REPLACE the Layer with a new name. If the input information does not have an ID, like the example above, then the Content Cache will create new layers from that final layer list. This can be seen in the final panel that the Layers exist in Grasshopper, but no ID is listed for each of them.
Because blocks needs to be at 0,0,0 as insertion point. Then the objects should be moved to 0,0,0 when making a block definition. I do something like this.