From c4e1ddd4d193e03d4bdd8873faf0e7f47c28d057 Mon Sep 17 00:00:00 2001 From: David Bucciarelli Date: Wed, 17 Jun 2020 13:23:22 +0200 Subject: [PATCH] Fixed LXS parsing of UV inlined coordinates (#392) --- release-notes.txt | 1 + src/luxcore/luxparser/luxparse.y | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/release-notes.txt b/release-notes.txt index bc19895ed..20ff4f166 100644 --- a/release-notes.txt +++ b/release-notes.txt @@ -53,6 +53,7 @@ * Fixed a bug causing fireflies when using light tracing for caustics in some case (#329) * Fixed a crash when using RemoveUnusedTextures() with Volumes (issue #377) * Fixed a banding problem when using sphere light sources with very small radius (issue LuxCoreRender/BlendLuxCore#477) +* Fixed LXS parsing of UV inlined coordinates (#392) Note: due to Glossycoating updated support for bump mapping on GPUs, some old scene using this kind of material/bump map combination may require some fix. diff --git a/src/luxcore/luxparser/luxparse.y b/src/luxcore/luxparser/luxparse.y index 8ddb7f05e..37226fdd5 100644 --- a/src/luxcore/luxparser/luxparse.y +++ b/src/luxcore/luxparser/luxparse.y @@ -1602,7 +1602,8 @@ ri_stmt: ACCELERATOR STRING paramlist if (props.IsDefined("uv")) { Property uvsProps = props.Get("uv"); - if ((uvsProps.GetSize() == 0) || (uvsProps.GetSize() != pointsProp.GetSize())) + if ((uvsProps.GetSize() == 0) || (uvsProps.GetSize() % 2 != 0) || + (uvsProps.GetSize() / 2 != pointsProp.GetSize() / 3)) throw runtime_error("Wrong trianglemesh/mesh uv list length: " + objName); // Copy all uvs *sceneProps <<