From 65b8e857519d2843c6c56cb2f83fea50664f862d Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sun, 21 Jun 2026 07:29:18 +0300 Subject: [PATCH] fix(select): highlight a block's solid body on hover/selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The instanced block solid meshes kept the inner solid's handle as their name, but the highlight tint matches the mesh name against the hovered / selected handle — which for a block is the parent INSERT. So hovering or selecting a block whose body is a solid never tinted it. Tag the instanced meshes with the parent INSERT handle so the orange hover / blue selection tint applies. Co-Authored-By: Claude Opus 4.8 --- src/scene/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/scene/mod.rs b/src/scene/mod.rs index e60f3e83a..3a74d2764 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -2094,7 +2094,17 @@ impl Scene { if !self.mesh_entity_visible(ins.common.handle) { continue; } + let start = out.len(); self.expand_block_meshes(&ins.block_name, &ins.get_transform(), 0, woff, &mut out); + // Tag the instanced meshes with the parent INSERT handle so the + // hover / selection highlight (keyed on the mesh name) tints the + // block, not the inner solid's own handle which nothing selects. + let name = ins.common.handle.value().to_string(); + for set in &mut out[start..] { + for m in &mut set.lods { + m.name = name.clone(); + } + } } } out