---
title: "select.lasso: Lasso Select — Scene kit command — Kition"
description: "Selects what the outline `points` (viewport pixels) encloses (objects in object mode, the edited mesh's elements in edit mode), as the selection, added to it or taken out of it (`mode`); what is hidden behind a surface only with X-ray. Session state: no undo step."
canonical: "https://developer.kition.ai/docs/kits/scene/commands/select.lasso"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/scene/commands/select.lasso](https://developer.kition.ai/docs/kits/scene/commands/select.lasso)

# select.lasso

**Lasso Select.** Selects what the outline `points` (viewport pixels) encloses (objects in object mode, the edited mesh's elements in edit mode), as the selection, added to it or taken out of it (`mode`); what is hidden behind a surface only with X-ray. Session state: no undo step.

- Kit: Scene 0.1.0 (.kscene); reference: [Scene kit commands](https://developer.kition.ai/docs/kits/scene.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `mode` | `"set" \| "extend" \| "subtract"` | no | How what is found changes the selection: set (it becomes the selection), extend (added), subtract (taken out); set |
| `points` | `number[][]` | yes | The lasso's outline, viewport pixels [[x, y], …] (at least 3) |

## Call through scene_run

```text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "select.lasso", "params": { "points": <number[][]> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `mode`. scene_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | `integer \| null` | no | the active object, null when there is none |
| `objects` | `integer[]` | no |  |
| `vertices` | `integer` | no | the edited mesh's selected vertices |

```json
{
  "additionalProperties": true,
  "properties": {
    "active": {
      "description": "the active object, null when there is none",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "objects": {
      "items": {
        "type": "integer"
      },
      "type": "array"
    },
    "vertices": {
      "description": "the edited mesh's selected vertices",
      "type": "integer"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "mode": {
      "description": "How what is found changes the selection: set (it becomes the selection), extend (added), subtract (taken out); set",
      "enum": [
        "set",
        "extend",
        "subtract"
      ],
      "type": "string"
    },
    "points": {
      "description": "The lasso's outline, viewport pixels [[x, y], …] (at least 3)",
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    }
  },
  "required": [
    "points"
  ],
  "type": "object"
}
```

Generated from the command list of @kition/scene-darwin-arm64@0.1.0 and the kit itself (scene_commands through @kition/cli@0.1.1, built from KitionAI/kition-scene@4d06faf).
