From 0a3862c54b67c77562704fd901bdf35fc6709650 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 23 Jul 2026 01:13:17 +0300 Subject: [PATCH] fix(block): don't draw the tag for empty constant attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A constant ATTDEF renders as block content, but with an empty default value there is nothing to draw — the ATTDEF tessellator would fall back to its tag-placeholder preview (meant for standalone definitions), so blocks showed the literal tag text where AutoCAD shows nothing. Co-Authored-By: Claude Fable 5 --- src/scene/cache/block_cache.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/scene/cache/block_cache.rs b/src/scene/cache/block_cache.rs index b26fbc117..46c9740f7 100644 --- a/src/scene/cache/block_cache.rs +++ b/src/scene/cache/block_cache.rs @@ -348,8 +348,13 @@ fn build_defn( // ATTRIB with the real value (tessellated separately). A CONSTANT // attribute has no ATTRIB; its value lives in the block itself, so // it must render as part of the block content (unless flagged - // invisible). - EntityType::AttributeDefinition(ad) if !ad.flags.constant || ad.flags.invisible => { + // invisible). With an empty value there is nothing to draw: the + // ATTDEF tessellator would fall back to its tag-placeholder + // preview, which belongs to a standalone definition, not to + // placed block content. + EntityType::AttributeDefinition(ad) + if !ad.flags.constant || ad.flags.invisible || ad.default_value.is_empty() => + { continue } EntityType::Insert(nested_ins) => {