fix(select): highlight a block's solid body on hover/selection
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 <noreply@anthropic.com>
This commit is contained in:
parent
cd10aa0363
commit
65b8e85751
1 changed files with 10 additions and 0 deletions
|
|
@ -2094,7 +2094,17 @@ impl Scene {
|
||||||
if !self.mesh_entity_visible(ins.common.handle) {
|
if !self.mesh_entity_visible(ins.common.handle) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
let start = out.len();
|
||||||
self.expand_block_meshes(&ins.block_name, &ins.get_transform(), 0, woff, &mut out);
|
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
|
out
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue