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

Provide a base class that can be in a referenced or imported mode #5664

Open
ivanimanishi opened this issue Feb 8, 2024 · 0 comments
Open

Comments

@ivanimanishi
Copy link
Member

Summary

Provide an official way to create custom node definitions that can dynamically switch between a "referenced" and "imported" modes.

User story

We currently have custom nodes derived from Gaffer.Box that switch from "referenced" and "imported" states dynamically.
Being in a "referenced" state mostly means it doesn't serialise its contents, instead reading an external file (like the Gaffer.Reference). That also necessarily means that it's in a read-only mode (because the contents are not going to be serialised).
In a "imported" state, it will serialise its contents, like a Gaffer.Box. And they may or may not be in a read-only mode.

This has mostly worked so far, but there is a a constant risk of things breaking because Gaffer will often only consider the Gaffer.Reference when it needs to support something that reads its contents from an external file (ex: https://github.com/GafferHQ/gaffer/blob/main/src/GafferBindings/MetadataBinding.cpp#L81).

It would be great if we could have an official way to create such types of node that would be properly supported by Gaffer.

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

No branches or pull requests

1 participant