fix(blocks): unify block-backed content

Route pictures, table cells, leader content, symbols, and arrows through one dependency and transform graph.\n\nRefs #864
This commit is contained in:
Hakan Seven committed 2026-08-31 01:09:32 +03:00
1 parent 3a5591e036
commit 19629d1246
12 files changed
+902 -557

No files matched your search

+17 -15
View File
@@ -1289,6 +1289,7 @@ impl Scene {
all_visible,
depth_map.as_ref(),
)
.with_annotation_scale(self.annotation_scale)
.with_viewport(viewport);
let mut hatch_block_memo = std::collections::HashMap::new();
let mut models = Vec::new();
@@ -1315,24 +1316,24 @@ impl Scene {
return matches!(entity, EntityType::Insert(_))
&& targets.contains(&common.handle);
}
match entity {
EntityType::Insert(insert) => {
let block_uses: Vec<_> = crate::scene::render_graph::entity_render_block_uses(
&self.document,
entity,
1.0,
)
.into_iter()
.filter(|block_use| block_use.active)
.collect();
if block_uses.is_empty() {
true
} else {
block_uses.into_iter().any(|block_use| {
crate::scene::render_graph::block_contains_hatch(
&self.document,
&insert.block_name,
&block_use.insert.block_name,
&mut hatch_block_memo,
)
}
EntityType::Dimension(dimension) => {
let name = dimension.base().block_name.trim();
!name.is_empty()
&& crate::scene::render_graph::block_contains_hatch(
&self.document,
name,
&mut hatch_block_memo,
)
}
_ => true,
})
}
},
|entity, context| {
@@ -1464,7 +1465,8 @@ impl Scene {
annotation_scale_handle,
all_visible,
depth_map.as_ref(),
);
)
.with_annotation_scale(self.annotation_scale);
let mut models = Vec::new();
let mut wipeout_sources = rustc_hash::FxHashMap::default();
graph.walk_root(