From bb226373e6ad91706757dd3b6bc1de4f938e49a8 Mon Sep 17 00:00:00 2001 From: benjamaan476 Date: Fri, 19 Sep 2025 11:03:48 +0100 Subject: [PATCH 1/3] add SceneGetEntityIds --- modeling-cmds/src/def_enum.rs | 11 +++++++++++ modeling-cmds/src/ok_response.rs | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/modeling-cmds/src/def_enum.rs b/modeling-cmds/src/def_enum.rs index 3cff5e09..2652e6d4 100644 --- a/modeling-cmds/src/def_enum.rs +++ b/modeling-cmds/src/def_enum.rs @@ -1498,6 +1498,17 @@ define_modeling_cmd_enum! { pub filter: Vec, } + /// Get the all 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, + } + /// Use orthographic projection. #[derive( Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, diff --git a/modeling-cmds/src/ok_response.rs b/modeling-cmds/src/ok_response.rs index afa17422..19d95cff 100644 --- a/modeling-cmds/src/ok_response.rs +++ b/modeling-cmds/src/ok_response.rs @@ -544,6 +544,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, + } + /// The response from the `CurveGetControlPoints` command. #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] pub struct CurveGetControlPoints { From b851d236d32a4bc7af03d717baa536d167642db1 Mon Sep 17 00:00:00 2001 From: benjamaan476 Date: Fri, 19 Sep 2025 11:46:47 +0100 Subject: [PATCH 2/3] update return type --- modeling-cmds/src/ok_response.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modeling-cmds/src/ok_response.rs b/modeling-cmds/src/ok_response.rs index 19d95cff..da7a21f8 100644 --- a/modeling-cmds/src/ok_response.rs +++ b/modeling-cmds/src/ok_response.rs @@ -549,7 +549,7 @@ define_ok_modeling_cmd_response_enum! { #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] pub struct SceneGetEntityIds { /// The ids of the requested entities. - pub entity_ids: Vec, + pub entity_ids: Vec>, } /// The response from the `CurveGetControlPoints` command. From 6be4b4a6fe806238df4cb2d98b6a0a831f747171 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 2 Oct 2025 10:54:29 +0100 Subject: [PATCH 3/3] add skip and take for SceneGetEntityIds --- modeling-cmds/src/def_enum.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modeling-cmds/src/def_enum.rs b/modeling-cmds/src/def_enum.rs index 48e91423..15a43642 100644 --- a/modeling-cmds/src/def_enum.rs +++ b/modeling-cmds/src/def_enum.rs @@ -1536,6 +1536,10 @@ define_modeling_cmd_enum! { pub struct SceneGetEntityIds { /// The entity types to be queried. pub filter: Vec, + /// Skip the first n returned ids. + pub skip: u32, + /// Take n ids after any ids skipped. + pub take: u32, } /// Use orthographic projection.