Hello, everyone.
I use Rhino6 (Windows 10 Rhino6 SR24) and I want to export each of the multiple materials to an rmtl file.
Of course, I can export one by one, but I’d like to be able to export one at a time with a script or something.
In Rhino6, I could export to rmtl with the [-Materials] command, so I was able to export a named material with the following script.
===========================================================================
# -- coding: utf-8 --
import rhinoscriptsyntax as rs
rs.Command('! _-Materials _Options _SaveToFile "Glass" "C:\export\Glass_export.rmtl" _Enter _Enterend')
===========================================================================
But in this way, I have to specify the material’s name or ID, respectively.
How can I select the names or ID of existing materials?
import scriptcontext as sc
sc.doc.RenderMaterials
??
Best regards,
Masaki