Use Ruby To Apply Materials to Spacific Layers
-
Amos, Thanks, this is a big help for me. Any reason why (sometimes) I have to click on the display after the plugin has run in order for the textures to change? Hmm... Sometimes I change the component name from different menus, or change the texture name from diferent menus. Does it matter?
-
Inside the Vray Plugin have tool to apply materials to specific layers.
-
Hi,
This one may help you too: layers_materials.rb to be found at the Ruby Library Depot, "layers Selection"page. -
Man I thought python and Dynamo were hard. I even had a go at lisp but for some reason I cant get my head a round ruby. I like the code above but want to use the clean code but also just add in the layer names and leave the other ones alone. It seams that when I run this it converts all the layers in the model to Default and then the layer color had to be the same as the material name. I like the hash option but cant seem to get it to run on transparent materials and it only paints 1 side. any suggestions
P.S. I am bringing in a dwg (exported from Revit) with 20 or so layers and want to put all the layers to 1 color but windows I want them to be on Translucent Glass Gray
F.E. all layers to color 123_White except 0_EX_Glazing it needs to be on Translucent Glass Gray
Some of the issues
- the import comes in as 1 group (with layers in the group)
- some of the groups come in the main group with groups within groups (doors and Door windows)
Objects come in with a material not defined (<auto1>)so a generic material must be placed on all the objects for the script to have a chance.
Thanks in advance
Advertisement