Update scene document versions and refine terrain layer validation

This commit is contained in:
2026-05-13 00:46:55 +02:00
parent aa1bc272ab
commit ac775e7e01
2 changed files with 6 additions and 2 deletions

View File

@@ -3059,7 +3059,10 @@ function validateTerrain(
const expectedPaintWeightCount =
terrain.sampleCountX *
terrain.sampleCountZ *
getTerrainStoredPaintWeightCount(terrain.layers.length);
(terrain.layers.length >= MIN_TERRAIN_LAYER_COUNT &&
terrain.layers.length <= MAX_TERRAIN_LAYER_COUNT
? getTerrainStoredPaintWeightCount(terrain.layers.length)
: 0);
if (terrain.paintWeights.length !== expectedPaintWeightCount) {
diagnostics.push(