Skip to content
37 changes: 37 additions & 0 deletions modeling-cmds/openapi/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -5413,6 +5413,43 @@
"type"
]
},
{
"description": "Get the all ids of a given entity type.",
"type": "object",
"properties": {
"filter": {
"description": "The entity types to be queried.",
"type": "array",
"items": {
"$ref": "#/components/schemas/EntityType"
}
},
"skip": {
"description": "Skip the first n returned ids.",
"type": "integer",
"format": "uint32",
"minimum": 0
},
"take": {
"description": "Take n ids after any ids skipped.",
"type": "integer",
"format": "uint32",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"scene_get_entity_ids"
]
}
},
"required": [
"filter",
"skip",
"take",
"type"
]
},
{
"description": "Use orthographic projection.",
"type": "object",
Expand Down
15 changes: 15 additions & 0 deletions modeling-cmds/src/def_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,21 @@ define_modeling_cmd_enum! {
pub filter: Vec<EntityType>,
}

/// Get the ids of a given entity type.
#[derive(
Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct SceneGetEntityIds {
/// The entity types to be queried.
pub filter: Vec<EntityType>,
/// Skip the first n returned ids.
pub skip: u32,
/// Take n ids after any ids skipped.
pub take: u32,
}

/// Use orthographic projection.
#[derive(
Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
Expand Down
8 changes: 8 additions & 0 deletions modeling-cmds/src/ok_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,14 @@ define_ok_modeling_cmd_response_enum! {
/// The type of the entity.
pub entity_type: EntityType,
}

/// The response from the `SceneGetEntityIds` command.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct SceneGetEntityIds {
/// The ids of the requested entities.
pub entity_ids: Vec<Vec<Uuid>>,
}

/// The response from the `CurveGetControlPoints` command.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct CurveGetControlPoints {
Expand Down
Loading