selection_set
Changes the node selection (nodeIds) and the element selection (targets: TargetRef[] with elements), each by mode: 'replace' (default), 'add', 'remove' or 'toggle'; additive: true is 'add'. At least one of nodeIds and targets; a mode applies only to the inputs given, so { targets, mode: 'replace' } keeps the nodes. Unknown node ids and unknown or stale targets are ignored and listed. Returns { nodeIds, elements?, ignored }: both whole selections after the change (elements absent when empty).
Usage
surface.execute('selection_set', { nodeIds?, targets?, additive?, mode? })Parameters
nodeIdsstring[]targetsobject[]additivebooleanadd to the selection instead of replacing it; the same as mode 'add'
mode"replace" | "add" | "remove" | "toggle"how the given ids or targets change the selection (default 'replace'); not with additive
Returns
object with nodeIds, elements, ignored, in the ok: true envelope.
{
"type": "object",
"properties": {
"nodeIds": {
"type": "array",
"items": {
"type": "string"
}
},
"elements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"nodeId": {
"type": "string"
},
"elements": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"point",
"edge",
"face",
"curve",
"topology-edge"
]
},
"ids": {
"type": "array",
"items": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
"from": {
"type": "array",
"items": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
"handleId": {
"type": "string"
}
},
"required": [
"domain",
"ids",
"handleId"
]
}
},
"required": [
"nodeId",
"elements"
]
}
},
"ignored": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"nodeId": {
"type": "string"
},
"elements": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"point",
"edge",
"face",
"curve",
"topology-edge"
]
},
"ids": {
"type": "array",
"items": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
"from": {
"type": "array",
"items": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
"handleId": {
"type": "string"
}
},
"required": [
"domain",
"ids",
"handleId"
]
}
},
"required": [
"nodeId",
"elements"
]
}
]
}
}
},
"required": [
"nodeIds",
"ignored"
]
}