Skip to content

Commit

Permalink
Rhino Export Hangs: "s.materials().count is not a function" #459
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacsv committed Apr 27, 2024
1 parent 4cd216c commit e096c58
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions source/engine/export/exporter3dm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 ();
}
Expand Down

0 comments on commit e096c58

Please sign in to comment.