Rhino material doesn't work when it's imported from layer 0 #87

This commit is contained in:
kovacsv 2021-06-17 10:08:01 +02:00
parent d402b7f531
commit c1bdfde874

View File

@ -246,7 +246,7 @@ OV.Importer3dm = class extends OV.ImporterBase
}
} else if (rhinoAttributes.materialSource === rhino.ObjectMaterialSource.MaterialFromLayer) {
let layerIndex = rhinoAttributes.layerIndex;
if (layerIndex > 0) {
if (layerIndex > -1) {
let layer = rhinoDoc.layers ().get (layerIndex);
let layerMaterialIndex = layer.renderMaterialIndex;
if (layerMaterialIndex > -1) {