Skip to content

Conversation

@jminor
Copy link
Member

@jminor jminor commented May 31, 2023

This begins to address #11

For now, this stores colors in a metadata field: "raven": {"color": "CYAN"}

Here's what it looks like.
Screenshot 2023-05-30 at 9 54 41 PM

jminor added 6 commits May 30, 2023 12:31
Signed-off-by: Joshua Minor <joshm@pixar.com>
Signed-off-by: Joshua Minor <joshm@pixar.com>
Signed-off-by: Joshua Minor <joshm@pixar.com>
Signed-off-by: Joshua Minor <joshm@pixar.com>
Signed-off-by: Joshua Minor <joshm@pixar.com>
…dots.

Signed-off-by: Joshua Minor <joshm@pixar.com>
if (item->metadata().has_key("raven") &&
item->metadata()["raven"].type() == typeid(otio::AnyDictionary))
{
auto raven_md = otio::any_cast<otio::AnyDictionary>(item->metadata()["raven"]);
Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a more elegant way to get/set a field within a nested metadata dictionary? This feels very awkward compared to the Python equivalent.

Copy link
Member

Choose a reason for hiding this comment

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

AFAIK, what you are doing is as compact as it gets. I think we'd have to do some work with template and operator magic to create a kind of DSL that would let you index deeply into nested dictionaries.

jminor added 2 commits May 30, 2023 22:04
Signed-off-by: Joshua Minor <joshm@pixar.com>
Signed-off-by: Joshua Minor <joshm@pixar.com>
@meshula
Copy link
Member

meshula commented May 31, 2023

Our Marker schema has a color property (with the enumeration you're using here). I'm wondering if it's time to talk about migrating the property higher in the schema, so that it becomes available to any composable element?

@timlehr
Copy link
Collaborator

timlehr commented Jun 1, 2023

Very cool! I wonder if this should be the beginning of discussion about a custom schema for Raven specific metadata.

@jminor
Copy link
Member Author

jminor commented Jun 2, 2023

Discussion about OTIO schema for per-clip colors can continue here: AcademySoftwareFoundation/OpenTimelineIO#1614

@jminor jminor merged commit b9992e8 into OpenTimelineIO:main Jun 2, 2023
@jminor jminor mentioned this pull request Jun 2, 2023
jspada200 pushed a commit to jspada200/raven that referenced this pull request Aug 25, 2025
* Per-clip and per-track colors in the UI
* Highlight selected items in white.
* Invert effect label color based on fill color
* Render effect bubbles smaller, and if there's not much room, just as dots.

Signed-off-by: Joshua Minor <joshm@pixar.com>
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.

3 participants