Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all nodes stackable and generalize layers as stacked Merge nodes #1510

Closed
Tracked by #144
Keavon opened this issue Dec 13, 2023 · 1 comment · Fixed by #1712, #1738, #1739 or #1748
Closed
Tracked by #144

Make all nodes stackable and generalize layers as stacked Merge nodes #1510

Keavon opened this issue Dec 13, 2023 · 1 comment · Fixed by #1712, #1738, #1739 or #1748
Assignees
Labels
Graphene Involves the node graph system/engine used by Graphite
Milestone

Comments

@Keavon
Copy link
Member

Keavon commented Dec 13, 2023

Currently, the Layer node performs a compositing operation with the bottom and left data. But we also want other adjustment-style nodes (with a single primary input and output of the same type, like blur, HSV, grayscale, Imaginate, etc.) to support being layers also.

To make this change, we need to tweak the current definition of a layer. The current functionality of the Layer node should become the Composite node, which is a standard-looking node. Then all nodes should be given a boolean flag as metadata indicating whether that node should be drawn as a layer. If drawn as a layer, its left-to-right primary input/output becomes bottom-to-top primary input/output. Other exposed input parameters are drawn on the left (for now it's ok to just support one input until I work out the styling for multiple). We can add a "Convert to Layer"/"Convert to Node" toggle up near where we have the "Make Hidden" and "Preview" buttons.

Here's an example from the mockup of what a standard Composite layer (which is today's functionality of layers) and a Hue/Saturation adjustment node look like when they are both acting as layers:

image

The image icon indicates it's a Composite node which has the features of what layers already do today. Thus these will be the most common form of nodes. But making this generalization will allow other nodes, like Hue/Saturation as shown in the mockup above, to stacked vertically in the graph. This is especially important for Imaginate's img2img feature now that the rasterize-the-layers-below approach is gone as part of the unified document graph refactor.

Q&A:

  • What about nodes with more than one parameter (secondary) input? -> Eventually the styling may be adjusted as needed to support multiple. For now we can just assume zero or one.
  • What about nodes with returned (secondary) outputs? -> The design might or might not accommodate them, but for now we just don't show those outputs so there is no way to connect them. If a node is converted from a node into a layer, we disconnect those.
@Keavon Keavon added Feature Graphene Involves the node graph system/engine used by Graphite labels Dec 13, 2023
@github-project-automation github-project-automation bot moved this to Short-Term in Task Board Dec 13, 2023
@Keavon Keavon moved this from Short-Term to In-Progress Tasks in Task Board Mar 30, 2024
@adamgerhant
Copy link
Collaborator

Currently working on this

@Keavon Keavon changed the title Generalize Layer nodes to support adjustment nodes as adjustment layers Make all nodes stackable and generalize Layer nodes as stacked Merge nodes Apr 8, 2024
@Keavon Keavon changed the title Make all nodes stackable and generalize Layer nodes as stacked Merge nodes Make all nodes stackable and generalize Layers as stacked Merge nodes Apr 8, 2024
@Keavon Keavon changed the title Make all nodes stackable and generalize Layers as stacked Merge nodes Make all nodes stackable and generalize layers as stacked Merge nodes May 1, 2024
@github-project-automation github-project-automation bot moved this from In-Progress Tasks to Tasks Completed This Sprint in Task Board May 1, 2024
@Keavon Keavon added this to the Sprint 36 milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment