I am fairly new to scripting and brazil. Is there a way to load a Brazil material from file and assign it to a layer using vb script? I am using rhino 4 if it makes a difference. Thank you.
Tags:
Karen
Here are the RDK scripting functions: http://wiki.mcneel.com/developer/rdkrhinoscripting
You will need "ContentLoadFromFile" and "SetMaterialInstanceId" - note that you will have to use Rhinoscript methods to get at the layer material index.
- Andy
Thank you. Following your pointers, I did this and it seems to work fine:
Function blnLoadMaterial(strFileName,strLayerName)
Set objRDK = Rhino.getPlugInObject("Renderer Development Kit")
strID = objRDK.contentLoadFromFile(strFileName)
intIndex = Rhino.addMaterialToLayer(strLayerName)
blnLoadMaterial = objRDK.SetMaterialInstanceId(strID, intIndex)
End Function
© 2022 Created by Scott Davidson.
Powered by