Skip to content

Class

TerrainPaintData

Generated GDScript class reference for GridPlacement.TerrainPaintData.

Status
Current
Version
v6.0
Source updated
Active v6.0 guide line from Grid Placement repo
Generated on
2026-09-01

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