Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Loader: Add colorspace entry to Version Info #5459

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion openpype/tools/loader/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,16 @@ def set_version(self, version_doc=None, version_id=None):
"source": source_label
}

# Add colorspace info to Version Info tab
version_colorspace = version_doc["data"].get("colorspace")
colorspace_html = ""
Comment on lines +744 to +746
Copy link
Collaborator

@BigRoy BigRoy Aug 17, 2023

Choose a reason for hiding this comment

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

Isn't the colorspace on the representations instead of the version?
@jakubjezek001 do you know how it should be? Because representations can have differing colorspaces, yes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked a few entries in MongoDB and I can only see it on the version data

Copy link
Member

Choose a reason for hiding this comment

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

In fact @BigRoy is right @fabiaserra. The new colorspaceData distribution is kept on representation level. The version data colorspace key is still available but will be removed soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah fair enough, no big deal, it was just a fast utility for me while testing the OpenRV integration to make sure what I was loading was getting the expected colorspace, happy to close it

if version_colorspace:
colorspace_html = "<b>Colorspace</b><br>{}<br><br>".format(
version_colorspace
)

data["colorspace_html"] = colorspace_html

self.setHtml((
"<h2>{subset}</h2>"
"<h3>{version}</h3>"
Expand All @@ -749,7 +759,7 @@ def set_version(self, version_doc=None, version_id=None):

"<b>Created</b><br>"
"{created}<br><br>"

"{colorspace_html}"
"<b>Source</b><br>"
"{source}"
).format(**data))
Expand Down