Skip to content

Class

ObjectFillSpan3D

Generated GDScript class reference for GridPlacement.ObjectFillSpan3D.

Status
Current
Version
v6.2.0
Source updated
2026-09-24
Generated on
2026-10-01

Line and rectangle fills for [ObjectPlacementService3D]: resolves one drag between two grid cells into the mounts the gesture places, previews them, and commits them in order through the service. Set the drag fields, then call [method cells] and pass the result to [method preview_edges] / [method cell_verdicts] while the drag moves and to [method commit] on release. CELL entries place one piece per span cell; EDGE entries mount one piece per authored span along the run. CORNER, FACE and TOP entries need a specific host per placement and are not fillable. [codeblock] var fill := ObjectFillSpan3D.new(service) fill.brush_shape = PlacementEnums.ObjectTool.RECTANGLE_FILL fill.start_cell = press_cell fill.end_cell = release_cell var result := fill.commit(fill.cells()) print("placed %d/%d" % [result.committed, result.attempted]) [/codeblock]

Source: addons/grid_placement/systems/building/3d/object_fill_span_3d.gd

Syntax

class ObjectFillSpan3D extends RefCounted

Members

NameKindSummary
MISSField
attemptedPropertyOutcome of one [method commit]. Mounts the commit tried to place.
committedPropertyPieces actually placed.
last_reportPropertyThe last report the commit produced, or null when nothing was tried.
last_successPropertyThe last successful report, or null when nothing placed.
blockedPropertyThe first issue of each failed mount, in commit order.
cellsPropertyThe EDGE mounts a fill places: one cell and edge per piece, in order.
edgesProperty
addMethod
serviceProperty
brush_shapePropertyThe [enum PlacementEnums.ObjectTool] the session brush holds.
start_cellPropertyGrid cell the drag started on (its Y is the fill level).
end_cellPropertyGrid cell under the cursor now.
anchor_cellPropertyEDGE entries: anchor cell of the pressed mount; [constant MISS] means [member start_cell].
start_edgePropertyEDGE entries: edge of the pressed mount. A pressed edge keeps its rotation along the whole run; [constant Vector3i.ZERO] derives facings from the drag.
max_cellsPropertyLargest span a gesture may cover; a larger drag yields no cells at all so preview and commit never disagree. 0 means no limit.
cursor_edgePropertyOptional [code]func(cell: Vector3i) -> Vector3i[/code]: the edge nearest the cursor, for EDGE spans with no drag direction. Defaults to +Z.
cursor_mountPropertyOptional [code]func(cell: Vector3i) -> Array[Vector3i][/code]: the [code][anchor_cell, edge][/code] mount under the cursor, for a one-cell EDGE span with no pressed edge. Defaults to [code][cell, cursor edge][/code].
budget_exceededPropertyTrue when the last [method cells] call went over [member max_cells].
is_edge_fillMethod
span_shapeMethod
cellsMethod
cells_3dMethod
cell_verdictsMethod
edge_mountsMethod
preview_edgesMethod
commitMethod