Import user strings for meshes, and add a todo for the whole model.
This commit is contained in:
parent
6e2e1a2109
commit
8d8fbc4447
12
source/external/rhinoimporter.js
vendored
12
source/external/rhinoimporter.js
vendored
@ -75,6 +75,7 @@ OV.Importer3dm = class extends OV.ImporterBase
|
|||||||
ImportRhinoDocument (rhinoDoc)
|
ImportRhinoDocument (rhinoDoc)
|
||||||
{
|
{
|
||||||
this.InitRhinoInstances (rhinoDoc);
|
this.InitRhinoInstances (rhinoDoc);
|
||||||
|
this.ImportRhinoUserStrings (rhinoDoc);
|
||||||
this.ImportRhinoGeometry (rhinoDoc);
|
this.ImportRhinoGeometry (rhinoDoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,6 +96,11 @@ OV.Importer3dm = class extends OV.ImporterBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImportRhinoUserStrings (rhinoDoc)
|
||||||
|
{
|
||||||
|
// TODO: https://github.com/mcneel/rhino3dm/issues/303
|
||||||
|
}
|
||||||
|
|
||||||
ImportRhinoGeometry (rhinoDoc)
|
ImportRhinoGeometry (rhinoDoc)
|
||||||
{
|
{
|
||||||
let rhinoObjects = rhinoDoc.objects ();
|
let rhinoObjects = rhinoDoc.objects ();
|
||||||
@ -174,6 +180,12 @@ OV.Importer3dm = class extends OV.ImporterBase
|
|||||||
let mesh = new OV.Mesh ();
|
let mesh = new OV.Mesh ();
|
||||||
mesh.SetName (rhinoAttributes.name);
|
mesh.SetName (rhinoAttributes.name);
|
||||||
|
|
||||||
|
let userStrings = rhinoAttributes.getUserStrings ();
|
||||||
|
for (let i = 0; i < userStrings.length; i++) {
|
||||||
|
let userString = userStrings[i];
|
||||||
|
mesh.AddProperty (new OV.Property (OV.PropertyType.Text, userString[0], userString[1]));
|
||||||
|
}
|
||||||
|
|
||||||
let materialIndex = this.GetMaterialIndex (rhinoDoc, rhinoObject, rhinoInstanceReferences);
|
let materialIndex = this.GetMaterialIndex (rhinoDoc, rhinoObject, rhinoInstanceReferences);
|
||||||
let threeJson = rhinoMesh.toThreejsJSON ();
|
let threeJson = rhinoMesh.toThreejsJSON ();
|
||||||
let vertices = threeJson.data.attributes.position.array;
|
let vertices = threeJson.data.attributes.position.array;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user