diff --git a/modeling-cmds/openapi/api.json b/modeling-cmds/openapi/api.json index 7674ba62..7e24f231 100644 --- a/modeling-cmds/openapi/api.json +++ b/modeling-cmds/openapi/api.json @@ -3615,6 +3615,15 @@ "type": "number", "format": "float" }, + "backface_color": { + "nullable": true, + "description": "Color of the backface", + "allOf": [ + { + "$ref": "#/components/schemas/Color" + } + ] + }, "color": { "description": "Color of the new material", "allOf": [ diff --git a/modeling-cmds/src/def_enum.rs b/modeling-cmds/src/def_enum.rs index 0c442804..ce04621b 100644 --- a/modeling-cmds/src/def_enum.rs +++ b/modeling-cmds/src/def_enum.rs @@ -802,6 +802,9 @@ define_modeling_cmd_enum! { pub roughness: f32, /// Ambient Occlusion of the new material pub ambient_occlusion: f32, + /// Color of the backface + #[serde(default, skip_serializing_if = "Option::is_none")] + pub backface_color: Option, } /// What type of entity is this? #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)] diff --git a/modeling-session/examples/cube_png.rs b/modeling-session/examples/cube_png.rs index 65cffae5..ee77301e 100644 --- a/modeling-session/examples/cube_png.rs +++ b/modeling-session/examples/cube_png.rs @@ -21,8 +21,8 @@ const CUBE_WIDTH: LengthUnit = LengthUnit(100.0); async fn main() -> Result<()> { // Set up the API client. let token = env::var("ZOO_API_TOKEN") - .or_else(|_| env::var("KITTYCAD_API_TOKEN")) // legacy name - .context("You must set $ZOO_API_TOKEN")?; + .or_else(|_| env::var("KITTYCAD_API_TOKEN")) // legacy name + .context("You must set $ZOO_API_TOKEN")?; let client = kittycad::Client::new(token); // Where should the final PNG be saved?