diff --git a/modeling-cmds/src/def_enum.rs b/modeling-cmds/src/def_enum.rs index b112a13c..a4312a8a 100644 --- a/modeling-cmds/src/def_enum.rs +++ b/modeling-cmds/src/def_enum.rs @@ -1727,12 +1727,23 @@ define_modeling_cmd_enum! { /// Which units the `value` field uses. pub units: units::UnitLength, } + /// Set the grid lines to auto scale. The grid will get larger the further you zoom out, /// and smaller the more you zoom in. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)] #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))] #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))] - pub struct SetGridAutoScale { + pub struct SetGridAutoScale {} + + /// Apply a label to an object. + #[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 SetLabel { + /// The object to be labeled. + pub object_id: Uuid, + /// Label to be set. Send an empty string to unset the label. + pub label: String, } } } diff --git a/modeling-cmds/src/ok_response.rs b/modeling-cmds/src/ok_response.rs index 90bdba92..214fe9aa 100644 --- a/modeling-cmds/src/ok_response.rs +++ b/modeling-cmds/src/ok_response.rs @@ -945,6 +945,7 @@ define_ok_modeling_cmd_response_enum! { pub extra_solid_ids: Vec, } + /// The response from the 'SetGridScale'. #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] pub struct SetGridScale {} @@ -952,5 +953,9 @@ define_ok_modeling_cmd_response_enum! { /// The response from the 'SetGridScale'. #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] pub struct SetGridAutoScale {} + + /// The response from the 'SetLabel' command. + #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] + pub struct SetLabel {} } }