Integrate foliage blocker mask values into viewport state and brush logic
This commit is contained in:
@@ -10025,6 +10025,9 @@ export class ViewportHost {
|
|||||||
const heightSampleIndices = new Set(activeStroke.heightSampleIndices);
|
const heightSampleIndices = new Set(activeStroke.heightSampleIndices);
|
||||||
const paintWeightIndices = new Set(activeStroke.paintWeightIndices);
|
const paintWeightIndices = new Set(activeStroke.paintWeightIndices);
|
||||||
const foliageMaskValueKeys = new Set(activeStroke.foliageMaskValueKeys);
|
const foliageMaskValueKeys = new Set(activeStroke.foliageMaskValueKeys);
|
||||||
|
const foliageBlockerMaskValueIndices = new Set(
|
||||||
|
activeStroke.foliageBlockerMaskValueIndices
|
||||||
|
);
|
||||||
const mergeStampIndices = (
|
const mergeStampIndices = (
|
||||||
result: {
|
result: {
|
||||||
heightSampleIndices: readonly number[];
|
heightSampleIndices: readonly number[];
|
||||||
@@ -10033,6 +10036,7 @@ export class ViewportHost {
|
|||||||
typeof applyTerrainBrushStampInPlace
|
typeof applyTerrainBrushStampInPlace
|
||||||
>["foliageMaskValueIndices"];
|
>["foliageMaskValueIndices"];
|
||||||
foliageMaskValueKeys?: readonly string[];
|
foliageMaskValueKeys?: readonly string[];
|
||||||
|
foliageBlockerMaskValueIndices?: readonly number[];
|
||||||
}
|
}
|
||||||
) => {
|
) => {
|
||||||
for (const sampleIndex of result.heightSampleIndices) {
|
for (const sampleIndex of result.heightSampleIndices) {
|
||||||
@@ -10055,6 +10059,10 @@ export class ViewportHost {
|
|||||||
for (const foliageMaskValueKey of result.foliageMaskValueKeys ?? []) {
|
for (const foliageMaskValueKey of result.foliageMaskValueKeys ?? []) {
|
||||||
foliageMaskValueKeys.add(foliageMaskValueKey);
|
foliageMaskValueKeys.add(foliageMaskValueKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const maskIndex of result.foliageBlockerMaskValueIndices ?? []) {
|
||||||
|
foliageBlockerMaskValueIndices.add(maskIndex);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!cancelled) {
|
if (!cancelled) {
|
||||||
@@ -10110,7 +10118,8 @@ export class ViewportHost {
|
|||||||
changed &&
|
changed &&
|
||||||
(heightSampleIndices.size > 0 ||
|
(heightSampleIndices.size > 0 ||
|
||||||
paintWeightIndices.size > 0 ||
|
paintWeightIndices.size > 0 ||
|
||||||
foliageMaskValueKeys.size > 0);
|
foliageMaskValueKeys.size > 0 ||
|
||||||
|
foliageBlockerMaskValueIndices.size > 0);
|
||||||
const toolState = this.activeTerrainBrushStroke.toolState;
|
const toolState = this.activeTerrainBrushStroke.toolState;
|
||||||
this.activeTerrainBrushStroke = null;
|
this.activeTerrainBrushStroke = null;
|
||||||
this.terrainBrushPreviewGroup.visible = false;
|
this.terrainBrushPreviewGroup.visible = false;
|
||||||
@@ -10127,7 +10136,8 @@ export class ViewportHost {
|
|||||||
paintWeightIndices,
|
paintWeightIndices,
|
||||||
foliageMaskValueIndices: [...foliageMaskValueKeys].map(
|
foliageMaskValueIndices: [...foliageMaskValueKeys].map(
|
||||||
parseTerrainFoliageMaskValueKey
|
parseTerrainFoliageMaskValueKey
|
||||||
)
|
),
|
||||||
|
foliageBlockerMaskValueIndices: [...foliageBlockerMaskValueIndices]
|
||||||
});
|
});
|
||||||
|
|
||||||
const committed =
|
const committed =
|
||||||
|
|||||||
Reference in New Issue
Block a user