class_name SelectTool extends EditorTool ## Selects (or clears) the active object in `EditorCore.selection`. ## ## `args`: `object_id` (String) -- omitted or "" clears the selection. ## ## Selection is UI/session state, not chunk data (docs/architecture/editor.md ## ยง7.1 lists `SelectionManager` as a sibling of `UndoRedoStack`, not a ## client of it), so this intentionally never touches `core.undo_redo`. func _init() -> void: tool_id = "select" func apply(core: EditorCore, args: Dictionary) -> Variant: var object_id: String = args.get("object_id", "") if object_id == "": core.selection.clear() return true if core.model.find_object(object_id) == null: return false core.selection.select(object_id) return true