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

Added fake node context #1992

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

RunDevelopment
Copy link
Member

This adds a new context FakeNodeContext that informs other components/hooks whether the current node is fake. We have several features that need to know whether the current node is fake:

  • Refactoring options need to know this, because they create a real node and connect it to a fake node otherwise.
  • Copy Override ID assumes that the node is real. The override ID of a fake node doesn't make sense anyway.
  • Handles need to be swapped out for fake handles. (This was implemented already.)
  • The view image (eye) button on image outputs create a new node.

The new context makes it easy for all of them to know whether the current node is fake and change their behavior accordingly.

This is important for when we make fake nodes interactive (soon).


Changes:

  • Added FakeNodeContext and used it everywhere.
  • Moved CopyOverrideIdSection into refactoring options. Not quite a refactoring option, but close.
  • Make the view image (eye) button do nothing in fake nodes.

@joeyballentine joeyballentine merged commit 531aa94 into chaiNNer-org:main Jul 27, 2023
4 checks passed
@RunDevelopment RunDevelopment deleted the fake-node-context branch July 27, 2023 10:52
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.

2 participants