Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions modeling-cmds/openapi/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -6000,6 +6000,26 @@
"required": [
"type"
]
},
{
"description": "TODO: Explain what this means.",
"type": "object",
"properties": {
"enabled": {
"nullable": true,
"description": "Enables or disables OIT. If not given, toggles it.",
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"set_order_independent_transparency"
]
}
},
"required": [
"type"
]
}
]
},
Expand Down
11 changes: 11 additions & 0 deletions modeling-cmds/src/def_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1800,13 +1800,24 @@ 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 {
}

/// TODO: Explain what this means.
#[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 SetOrderIndependentTransparency {
/// Enables or disables OIT.
/// If not given, toggles it.
pub enabled: Option<bool>,
}
}
}

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 @@ -971,5 +971,13 @@ 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 'SetOrderIndependentTransparency'.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct SetOrderIndependentTransparency {
/// Is it now enabled, or disabled?
pub enabled: bool,
}

}
}
3 changes: 3 additions & 0 deletions modeling-cmds/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub struct EngineParams {
pub replay: Option<String>,
/// API Call ID for distributed tracing
pub api_call_id: Option<String>,
/// TODO: Give summary of what this actually means
pub order_independent_transparency: bool,
}

impl Default for EngineParams {
Expand All @@ -46,6 +48,7 @@ impl Default for EngineParams {
show_grid: false,
replay: None,
api_call_id: None,
order_independent_transparency: false,
}
}
}
Expand Down