From e38e40f3e812fb4fb816812afd3b1c5fb2ce6e5b Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Mon, 9 May 2022 20:27:44 +0200 Subject: [PATCH] VOXELFORMAT: use the palette of the merge for qef saving --- src/modules/voxelformat/QEFFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/voxelformat/QEFFormat.cpp b/src/modules/voxelformat/QEFFormat.cpp index 3c71ac205..91eaae7aa 100644 --- a/src/modules/voxelformat/QEFFormat.cpp +++ b/src/modules/voxelformat/QEFFormat.cpp @@ -136,7 +136,7 @@ bool QEFFormat::saveGroups(const SceneGraph &sceneGraph, const core::String &fil const uint32_t height = region.getHeightInVoxels(); const uint32_t depth = region.getDepthInVoxels(); stream.writeStringFormat(false, "%i %i %i\n", width, depth, height); - const voxel::Palette& palette = voxel::getPalette(); + const voxel::Palette& palette = merged.second; stream.writeStringFormat(false, "%i\n", palette.colorCount); for (int i = 0; i < palette.colorCount; ++i) { const uint32_t c = palette.colors[i];