mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Condense the narrative comments to their constraints
This commit is contained in:
@@ -2094,12 +2094,7 @@ fn collect_raster_metadata<S: LaneSource>(source: &S, metadata: &mut RenderMetad
|
||||
let transform: DAffine2 = source.attr::<Transform>(0);
|
||||
metadata.local_transforms.insert(element_id, transform);
|
||||
|
||||
// If this raster carries a snapshot of upstream graphic content (e.g. it was produced by Rasterize,
|
||||
// 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).
|
||||
// The snapshot's children already match `footprint`, so `transform` (the rasterization area) must not be applied.
|
||||
if let Some(upstream_nested_layers) = source.attr::<EditorMergedLayers>(0).filter(|layers| !layers.is_empty()) {
|
||||
upstream_nested_layers.collect_metadata(metadata, footprint, None);
|
||||
}
|
||||
|
||||
@@ -129,12 +129,8 @@ pub(crate) fn generate_node_code(crate_ident: &CrateIdent, parsed: &ParsedNodeFn
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Flipped nodes carry their kernel generics as struct parameters: record
|
||||
// edges no longer bind them through `Output`, so the struct must. A
|
||||
// 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.
|
||||
// Flipped kernels, ranked-input element generics, and the generics a
|
||||
// record-io node's secondary inputs name must be carried as struct parameters.
|
||||
let ctx_ident_for_flip = context_param(parsed).map(|ctx| ctx.ident.clone());
|
||||
let carries_generic = |ident: &Ident| {
|
||||
regular_fields.iter().enumerate().any(|(index, field)| match &field.ty {
|
||||
|
||||
@@ -349,12 +349,8 @@ fn mirror_vector_extent(
|
||||
|
||||
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`
|
||||
/// with its own trailing entry dropped. The terminating element of the returned path is the document node whose
|
||||
/// 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_path` with its trailing entry dropped: the containing network's path, which is also a unique
|
||||
/// reference to the owning document node at any nesting depth. Stamped onto `editor:layer_path`.
|
||||
#[node_macro::node(name("Path of Subgraph"), category(""))]
|
||||
pub fn path_of_subgraph(_: impl Ctx, node_path: Vec<NodeId>) -> Vec<NodeId> {
|
||||
let len = node_path.len();
|
||||
|
||||
Reference in New Issue
Block a user