From a9aebe77f4ac2fa7bdf2e8de5872bc4778088816 Mon Sep 17 00:00:00 2001 From: Viktor Kovacs Date: Sun, 25 Apr 2021 18:48:10 +0200 Subject: [PATCH] Export mesh names to rhino. --- source/external/rhino.exporter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/external/rhino.exporter.js b/source/external/rhino.exporter.js index 1fb2c0a..9bf8f17 100644 --- a/source/external/rhino.exporter.js +++ b/source/external/rhino.exporter.js @@ -68,7 +68,7 @@ OV.Exporter3dm = class extends OV.ExporterBase let material = model.GetMaterial (primitive.material); let rhinoMaterial = new this.rhino.Material (); - rhinoMaterial.name = material.name; + rhinoMaterial.name = this.GetExportedMaterialName (material.name); rhinoMaterial.ambientColor = ColorToRhinoColor (material.ambient); rhinoMaterial.diffuseColor = ColorToRhinoColor (material.diffuse); rhinoMaterial.specularColor = ColorToRhinoColor (material.specular); @@ -79,6 +79,7 @@ OV.Exporter3dm = class extends OV.ExporterBase let rhinoMesh = new this.rhino.Mesh.createFromThreejsJSON (threeJson); let rhinoAttributes = new this.rhino.ObjectAttributes (); + rhinoAttributes.name = this.GetExportedMeshName (mesh.GetName ()); rhinoAttributes.materialSource = this.rhino.ObjectMaterialSource.MaterialFromObject; rhinoAttributes.materialIndex = rhinoMaterialIndex; rhinoDoc.objects ().add (rhinoMesh, rhinoAttributes);