From 36c0a43fb92d131dd2dcf3f772317178d84dde17 Mon Sep 17 00:00:00 2001 From: Tobias Knerr Date: Sat, 19 Oct 2024 12:45:39 +0200 Subject: [PATCH] Handle untextured materials correctly in MoveColorsToVertices --- src/main/java/org/osm2world/core/target/common/MeshTarget.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/osm2world/core/target/common/MeshTarget.java b/src/main/java/org/osm2world/core/target/common/MeshTarget.java index 08072d2a..5a1b0695 100644 --- a/src/main/java/org/osm2world/core/target/common/MeshTarget.java +++ b/src/main/java/org/osm2world/core/target/common/MeshTarget.java @@ -251,7 +251,8 @@ public MeshStore apply(MeshStore meshStore) { for (MeshWithMetadata meshWithMetadata : meshStore.meshesWithMetadata()) { - if (meshWithMetadata.mesh().material.getTextureLayers().stream().noneMatch(it -> it.colorable)) { + if (!meshWithMetadata.mesh().material.getTextureLayers().isEmpty() + && meshWithMetadata.mesh().material.getTextureLayers().stream().noneMatch(it -> it.colorable)) { result.add(meshWithMetadata); continue; }