Scene kit command
select.circle
Circle Select
Selects what a circle of viewport pixels round `position` covers (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)
- 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 |
position | number[] | yes | The circle's middle, a viewport pixel [x, y] [x, y] |
radius | number | no | The circle's radius in viewport pixels (25) |
Call through scene_run
text
scene_run {
"path": "<file>.kscene",
"steps": [{ "command": "select.circle", "params": { "position": <number[]> } }]
}The required parameters, with placeholders for their types: not a tested example. Optional: mode, radius. 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 |
Result JSON Schema
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"
},
"position": {
"description": "The circle's middle, a viewport pixel [x, y] [x, y]",
"items": {
"type": "number"
},
"type": "array"
},
"radius": {
"description": "The circle's radius in viewport pixels (25)",
"type": "number"
}
},
"required": [
"position"
],
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (scene_commands through @kition/[email protected], built from KitionAI/kition-scene@4d06faf). As data: commands.jsonl.