From e096c5858bb6261158c684443c941a1e635b4e97 Mon Sep 17 00:00:00 2001 From: kovacsv Date: Sat, 27 Apr 2024 08:45:15 +0200 Subject: [PATCH] Rhino Export Hangs: "s.materials().count is not a function" #459 --- source/engine/export/exporter3dm.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/engine/export/exporter3dm.js b/source/engine/export/exporter3dm.js index d2f9eff..f9712e2 100644 --- a/source/engine/export/exporter3dm.js +++ b/source/engine/export/exporter3dm.js @@ -84,7 +84,7 @@ export class Exporter3dm extends ExporterBase rhinoMaterial.diffuseColor = ColorToRhinoColor (material.color); rhinoMaterial.transparency = 1.0 - material.opacity; - let rhinoMaterialIndex = rhinoDoc.materials ().count (); + let rhinoMaterialIndex = rhinoDoc.materials ().count; rhinoDoc.materials ().add (rhinoMaterial); let rhinoMesh = new this.rhino.Mesh.createFromThreejsJSON (threeJson); @@ -96,10 +96,7 @@ export class Exporter3dm extends ExporterBase } }); - let writeOptions = new this.rhino.File3dmWriteOptions (); - writeOptions.version = 6; - let rhinoDocBuffer = rhinoDoc.toByteArray (writeOptions); - + let rhinoDocBuffer = rhinoDoc.toByteArray (); rhinoFile.SetBufferContent (rhinoDocBuffer); onFinish (); }