I am able to load a visopt and the vismats I would like to use. How can I automatically apply these Vray materials to objects in Rhino? I’ve gathered that the objects should be on different layers depending on what material I would like to use… but as far as linking a vismat to a layer I am coming up short.
Thank you for any help
The only script method in the vray plugin is ApplyWrapperMaterialToSelection (ByVal filePath As String) which seems like it will not work for you. I don’t know enough about the Wrapper Material, and haven’t tried to use the method so not sure if it’s functional.
you might check this out:
https://github.com/mcneel/rhinopython/blob/master/scripts/rhinoscript/material.py
but getting the index of the materials may be a problem for you. i’ve found that rhino is only aware of vray materials that have been added since the file was opened. sounds like this may actually work for you, can’t tell from your post.
good luck, let us know what you find out.
-emil