Skip to content

Commit 50e74d6

Browse files
authored
Fixed multiple materials obj X3D export (#6102)
1 parent 7473d4d commit 50e74d6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/webots/nodes/WbCadShape.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,7 @@ QStringList WbCadShape::objMaterialList(const QString &url) const {
268268
if (!cleanLine.startsWith("mtllib"))
269269
continue;
270270

271-
cleanLine = cleanLine.replace("mtllib ", "").trimmed();
272-
cleanLine = cleanLine.replace("\"", "");
273-
materials << cleanLine.split(".mtl ", Qt::SkipEmptyParts);
274-
for (int i = 0; i < materials.size() - 1; i++) // the last item still have '.mtl'
275-
materials[i] += ".mtl";
271+
materials << cleanLine.replace("mtllib ", "").replace("\"", "").trimmed();
276272
}
277273
} else
278274
warn(tr("File '%1' cannot be read.").arg(url));

0 commit comments

Comments
 (0)