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

Serializing metadata on references #1536

Closed
davidsminor opened this issue Oct 30, 2015 · 0 comments
Closed

Serializing metadata on references #1536

davidsminor opened this issue Oct 30, 2015 · 0 comments

Comments

@davidsminor
Copy link
Contributor

Hello,

Looks like I've run into another problem on my big "asset managed plugs in gaffer" project. The asset managed plugs are tracked using metadata, and the idea was that you'd be able to bring in a referenced box with some asset managed plugs on it, then automatically load the correct entity versions onto those plugs using our bundle system.

It looks like that's run into a problem, which is that whenever you update the reference (or copy paste it, or save the scene and load it again), the entity info metadata from the session gets wiped out, which means my system's currently broken :(. This, of course, is because metadata doesn't get serialized on reference node plugs.

I've heard there have been other discussions with Mathias and Andrew in which this problem has come up, and I think you've kind of started working on it have you John? Anyway, it looks like I need serializable metadata on references to get my asset managed plugs thing working, and Andrew needs my asset managed plugs thing to get his outputs system working, so I'll make this ticket and do something else until you're back.

johnhaddon added a commit to johnhaddon/gaffer that referenced this issue Nov 12, 2015
Previously we never serialised _any_ metadata from Reference nodes, regardless of whether the metadata originated from within the referenced file or was added/edited after loading. We now support both the addition of new metadata and editing of metadata from the reference.

This implementation uses the persistence flag on each metadata item to track whether it is considered to have come from the referenced file or not. Strictly speaking, this is slightly abusing the semantics of that flag, but this does allow us to support edits with minimal changes, and is similar to the way we treat the Dynamic plug flag already. We still need a full system for tracking reference edits to plug values - when we implement such a thing we should probably track metadata edits with the same mechanism.

Fixes GafferHQ#1536.
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