Chris' Tutorials
Docs/Grid Placement

Class

TerrainPaintData

Generated GDScript class reference for GridPlacement.TerrainPaintData.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

Specialized [ManipulationData] for the TERRAIN action. Carries the terrain name, resolved terrain set/terrain, target cell, and target map for painting operations. Exposes a [method veto] hook that listeners can call from the [signal PlacementState.pre_terrain_paint] callback to cancel the paint. Lifecycle (5.1.0-G): [codeblock] try_place_terrain_by_name: status = STARTED emit pre_terrain_paint(data) # listeners may call data.veto() if data.vetoed: status = CANCELED return apply_plan() status = FINISHED [/codeblock]

Source: addons/grid_placement/placement/terrain/terrain_paint_data.gd

Syntax

class TerrainPaintData extends ManipulationData

Members

NameKindSummary
terrain_namePropertyThe terrain name to be painted (e.g. "dungeon_floor"). This is the single source of truth for terrain identification.
terrain_setPropertyThe resolved terrain set index from the TileSet.
terrainPropertyThe resolved terrain index within the terrain set.
terrain_cellPropertyThe grid cell where the terrain will be painted. This enables per-cell cost deduction, undo journaling, and effects.
target_mapPropertyThe TileMapLayer where the terrain will be painted.
vetoedPropertyTrue after any [signal PlacementState.pre_terrain_paint] listener calls [method veto]. [code]try_place_terrain_by_name[/code] checks this flag after the signal fires and short-circuits to [enum PlacementEnums.Status.CANCELED] when set, preserving the terrain from being painted.
vetoMethod

Source

addons/grid_placement/placement/terrain/terrain_paint_data.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs