I am tring to exporting glTF format in CPython with rhinoinside,but i encounter an issue: if i setting the property:Gltfoptions.ExportMaterials equal to False,it can be work.But if I need to export the material, the conversion will not be successful.There is no doubt that I need materials, can this problem be solved?
there is the code:
import rhinoinside
rhinoinside.load()
import Rhino
path = r"C:\Users\62687\Desktop\TestDoc\block.3dm"
doc = Rhino.RhinoDoc.OpenHeadless(path)
Rhino.RhinoDoc.ActiveDoc = doc
the_doc = Rhino.RhinoDoc.ActiveDoc
path_to = r"C:\Users\62687\Desktop\TestDoc\block.gltf"
Gltfoptions = Rhino.FileIO.FileGltfWriteOptions()
Gltfoptions.ExportMaterials = False # default value is True, export will fail
is_done = Rhino.FileIO.FileGltf.Write(path_to, the_doc, Gltfoptions)
print(is_done)