From 54acbab14e05d84df66e888ee1bc9b9cb0760172 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 00:43:38 -0800 Subject: [PATCH] Export 3D Object: docs say a texture's graphics take the fill's opacity docs/mcp.md said the graphics keep their own opacity; they take the opacity of the face's fill or stroke, and the object's opacity applies to the face and its graphics together. The split of a solid's mesh is laid out as rustfmt writes it. --- crates/effects/src/solids.rs | 4 +++- docs/mcp.md | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/effects/src/solids.rs b/crates/effects/src/solids.rs index eb1c844cdc..d25b84b46d 100644 --- a/crates/effects/src/solids.rs +++ b/crates/effects/src/solids.rs @@ -2389,7 +2389,9 @@ fn meshes_for(fx: &Effect, shapes: &[Profile], total: &mut usize, limit: usize) let mut out = vec![]; // A solid's parts with and without graphics count together against the limit. let mut keep = |out: &mut Vec, mesh: Mesh, (paint, opacity): (&Paint, f32), bounds: Rect| { - split_graphics(&fx.id, &p, bounds, mesh, (mesh_color(paint, opacity), opacity)).into_iter().try_for_each(|part| keep_mesh(out, total, part, limit)) + split_graphics(&fx.id, &p, bounds, mesh, (mesh_color(paint, opacity), opacity)) + .into_iter() + .try_for_each(|part| keep_mesh(out, total, part, limit)) }; if is_plane(&fx.id) { for s in shapes { diff --git a/docs/mcp.md b/docs/mcp.md index 41c15b2f8c..98f1db0cd9 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -8453,7 +8453,8 @@ about: in points (USD's layer gives `metersPerUnit`), in meters in glTF. Files t Graphics mapped onto a plane or onto Extrude & Bevel's front or back cap (`threeD.mapGraphic`) are exported as a PNG texture of that face: the face's color with its graphics drawn over it, flat and unlit, on a mesh of the face's own triangles with texture coordinates and a material that shows the texture. A face that is not opaque keeps its opacity -in the texture's alpha, and the graphics keep their own. glTF embeds the PNG as a data URI +in the texture's alpha: as on the canvas, the graphics take the opacity of the face's fill or stroke, and the object's +opacity applies to the face and its graphics together. glTF embeds the PNG as a data URI (`TEXCOORD_0`, `baseColorTexture`), USDZ stores it after the layer, USDA reads it through `primvars:st`, a `UsdPrimvarReader_float2` and a `UsdUVTexture` connected to the surface's `diffuseColor`, and OBJ gives `vt` coordinates and an MTL `map_Kd`; OBJ and USDA write the PNG beside them as `-texture-1.png`, `-texture-2.png` and so on