Condense the narrative comments to their constraints

This commit is contained in:
Dennis Kobert
2026-09-05 13:12:17 +00:00
parent 9ac039074d
commit 30573e6eb6
3 changed files with 5 additions and 18 deletions
@@ -2094,12 +2094,7 @@ fn collect_raster_metadata<S: LaneSource>(source: &S, metadata: &mut RenderMetad
let transform: DAffine2 = source.attr::<Transform>(0); let transform: DAffine2 = source.attr::<Transform>(0);
metadata.local_transforms.insert(element_id, transform); metadata.local_transforms.insert(element_id, transform);
// If this raster carries a snapshot of upstream graphic content (e.g. it was produced by Rasterize, // The snapshot's children already match `footprint`, so `transform` (the rasterization area) must not be applied.
// which destructively merges its inputs into pixels), recurse into that snapshot so the editor can
// surface the original child layers' click targets (the same mechanism Boolean Operation uses).
// The snapshot was captured before Rasterize shifted its input transforms to align with the rasterization
// area, so the children are already in the coordinate space matching `footprint` here — we must NOT
// multiply in `transform` (which is the rasterization area, not a layer-stack transform).
if let Some(upstream_nested_layers) = source.attr::<EditorMergedLayers>(0).filter(|layers| !layers.is_empty()) { if let Some(upstream_nested_layers) = source.attr::<EditorMergedLayers>(0).filter(|layers| !layers.is_empty()) {
upstream_nested_layers.collect_metadata(metadata, footprint, None); upstream_nested_layers.collect_metadata(metadata, footprint, None);
} }
+2 -6
View File
@@ -129,12 +129,8 @@ pub(crate) fn generate_node_code(crate_ident: &CrateIdent, parsed: &ParsedNodeFn
}) })
.collect(); .collect();
// Flipped nodes carry their kernel generics as struct parameters: record // Flipped kernels, ranked-input element generics, and the generics a
// edges no longer bind them through `Output`, so the struct must. A // record-io node's secondary inputs name must be carried as struct parameters.
// ranked input's element generic is carried on any node kind for the
// same reason: the materialized view monomorphizes the kernel per row. A
// record-io node's secondary inputs read erased off their wire, so a
// generic one of them names is carried too.
let ctx_ident_for_flip = context_param(parsed).map(|ctx| ctx.ident.clone()); let ctx_ident_for_flip = context_param(parsed).map(|ctx| ctx.ident.clone());
let carries_generic = |ident: &Ident| { let carries_generic = |ident: &Ident| {
regular_fields.iter().enumerate().any(|(index, field)| match &field.ty { regular_fields.iter().enumerate().any(|(index, field)| match &field.ty {
+2 -6
View File
@@ -349,12 +349,8 @@ fn mirror_vector_extent(
pub use _mirror_vector_mod::mirror_vector_entries; pub use _mirror_vector_mod::mirror_vector_entries;
/// Returns the path identifying the subgraph (network) that contains this proto node — i.e. the input `node_path` /// `node_path` with its trailing entry dropped: the containing network's path, which is also a unique
/// with its own trailing entry dropped. The terminating element of the returned path is the document node whose /// reference to the owning document node at any nesting depth. Stamped onto `editor:layer_path`.
/// encapsulated network we live in, so the path doubles as a unique reference to that node at any nesting depth.
/// Used as the value source for stamping the `editor:layer_path` attribute on each item of a layer's output, which lets
/// editor tools (e.g. selection, click target routing) trace data back to its owning layer regardless of whether
/// the layer is at the root document network or nested inside a custom subgraph.
#[node_macro::node(name("Path of Subgraph"), category(""))] #[node_macro::node(name("Path of Subgraph"), category(""))]
pub fn path_of_subgraph(_: impl Ctx, node_path: Vec<NodeId>) -> Vec<NodeId> { pub fn path_of_subgraph(_: impl Ctx, node_path: Vec<NodeId>) -> Vec<NodeId> {
let len = node_path.len(); let len = node_path.len();