Skip to content

Finalize and unify the design of the 'Morph' and 'Blend' nodes#3974

Open
Keavon wants to merge 20 commits intomasterfrom
fix-morph-transform-interp
Open

Finalize and unify the design of the 'Morph' and 'Blend' nodes#3974
Keavon wants to merge 20 commits intomasterfrom
fix-morph-transform-interp

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented Mar 29, 2026

Morph node

Before After
image image

Blend node

Renamed from Blend Shapes. The existing Blend node has also been renamed to Mix.

Before After
image image
image image

New features

The new Path parameter is added to the Morph node so it acts similar to the old Blend Shapes node implementation, and for consistency with the Position on Path node. It also adds a Reverse parameter to Morph for Position on Path consistency. Blend and Morph also gain a Distribution parameter with the choices: "Objects", "Distances", "Angles", "Sizes", and "Slants" for controlling what parameter of change is kept at equal speed.

This also adds the Layer > Blend and Layer > Morph menu entries:

image

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the Blend and Morph tools, enabling interpolation of geometry, appearance, and transforms between vector layers. Key updates include a major overhaul of the morph node to support control paths and various interpolation distributions, alongside new UI elements, keyboard shortcuts, and icons. The implementation also features document migration logic and performance optimizations for path interpolation. Review feedback highlights opportunities to improve code maintainability by replacing magic numbers with named constants, ensuring naming consistency across the UI, and completing placeholder metadata descriptions.

@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) March 29, 2026 05:26 Inactive
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 20 files

Confidence score: 3/5

  • There is concrete regression risk in editor/src/messages/portfolio/document/document_message_handler.rs: Blend/Morph grouping currently uses the root path (&[]), so nested-network workflows can group the wrong layers or no layers at all.
  • editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs has a real runtime edge case: when Count is 1 on open paths, count - 1 makes the denominator 0 and can produce NaN/inf outputs.
  • The PR-title rule issue in node-graph/graph-craft/src/document/value.rs is process-related rather than runtime behavior, so it raises review friction but not production breakage by itself; overall this lands in moderate merge risk.
  • Pay close attention to editor/src/messages/portfolio/document/document_message_handler.rs and editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs - nested selection path correctness and divide-by-zero/NaN behavior are the key user-facing risks.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="node-graph/graph-craft/src/document/value.rs">

<violation number="1" location="node-graph/graph-craft/src/document/value.rs:263">
P1: Custom agent: **PR title enforcement**

PR title violates the node-naming clause of the title rule: node names must be in single quotes, but Morph and Blend Shapes are unquoted.</violation>
</file>

<file name="editor/src/messages/portfolio/document/document_message_handler.rs">

<violation number="1" location="editor/src/messages/portfolio/document/document_message_handler.rs:1974">
P2: Blend/Morph grouping always uses the root network selection (`&[]`). This will group the wrong layers (or nothing) when the user is inside a nested network path. Use the current selection network path instead of `&[]`.</violation>
</file>

<file name="editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs">

<violation number="1" location="editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:505">
P2: Clamp the open-path denominator to at least 1. As written, `count - 1` becomes 0 when Count is 1, and the subsequent divide yields NaN/inf for open paths.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@Keavon Keavon changed the title Finalize the design of the Morph and Blend Shapes nodes with control path support Finalize the design of the Morph and Blend nodes with control path support Mar 29, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 10 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="frontend/src/icons.ts">

<violation number="1" location="frontend/src/icons.ts:157">
P2: Custom agent: **PR title enforcement**

PR title must wrap node names in single quotes per the rule. Update the title to quote the node names, for example: "Finalize the design of the 'Morph' and 'Blend Shapes' nodes with control path support".</violation>
</file>

<file name="editor/src/messages/portfolio/document/graph_operation/utility_types.rs">

<violation number="1" location="editor/src/messages/portfolio/document/graph_operation/utility_types.rs:160">
P2: Custom agent: **PR title enforcement**

PR title must start with one of the allowed leading verbs; “Finalize” is not in the approved verb list. Update the title to use an allowed verb like “Finalize” → “Finalize” is invalid; for example: “Update the design of the Morph and Blend Shapes nodes with control path support”.</violation>
</file>

<file name="editor/src/consts.rs">

<violation number="1" location="editor/src/consts.rs:190">
P1: Custom agent: **PR title enforcement**

Update the PR title to use an approved leading verb and put node names in single quotes (e.g., "Add the design of the 'Morph' and 'Blend Shapes' nodes with control path support").</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) March 29, 2026 06:30 Inactive
@Keavon Keavon changed the title Finalize the design of the Morph and Blend nodes with control path support Finalize the design of the 'Morph' and 'Blend' nodes with control path support Mar 29, 2026
@Keavon Keavon force-pushed the fix-morph-transform-interp branch from 93f462f to 5f38106 Compare March 29, 2026 07:27
@Keavon Keavon changed the title Finalize the design of the 'Morph' and 'Blend' nodes with control path support Finalize and unify the design of the 'Morph' and 'Blend' nodes Mar 29, 2026
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) March 29, 2026 07:31 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant