Update scene document versions and refine terrain layer validation
This commit is contained in:
@@ -3059,7 +3059,10 @@ function validateTerrain(
|
|||||||
const expectedPaintWeightCount =
|
const expectedPaintWeightCount =
|
||||||
terrain.sampleCountX *
|
terrain.sampleCountX *
|
||||||
terrain.sampleCountZ *
|
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) {
|
if (terrain.paintWeights.length !== expectedPaintWeightCount) {
|
||||||
diagnostics.push(
|
diagnostics.push(
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ import {
|
|||||||
type FoliagePrototypeRegistry
|
type FoliagePrototypeRegistry
|
||||||
} from "../foliage/foliage";
|
} from "../foliage/foliage";
|
||||||
|
|
||||||
export const SCENE_DOCUMENT_VERSION = 102 as const;
|
export const SCENE_DOCUMENT_VERSION = 103 as const;
|
||||||
|
export const DYNAMIC_TERRAIN_LAYERS_SCENE_DOCUMENT_VERSION = 103 as const;
|
||||||
export const PATH_ROAD_PREVIEW_SCENE_DOCUMENT_VERSION = 102 as const;
|
export const PATH_ROAD_PREVIEW_SCENE_DOCUMENT_VERSION = 102 as const;
|
||||||
export const PATH_TERRAIN_GLUE_SCENE_DOCUMENT_VERSION = 101 as const;
|
export const PATH_TERRAIN_GLUE_SCENE_DOCUMENT_VERSION = 101 as const;
|
||||||
export const SPLINE_PATH_SCENE_DOCUMENT_VERSION = 100 as const;
|
export const SPLINE_PATH_SCENE_DOCUMENT_VERSION = 100 as const;
|
||||||
|
|||||||
Reference in New Issue
Block a user