mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 22:02:15 +01:00
oscar's comment on the code changes
This commit is contained in:
parent
f0436f78c4
commit
fc3598ca2b
3 changed files with 8 additions and 10 deletions
|
|
@ -341,5 +341,8 @@ def reset_colorspace():
|
|||
ocio_config = max_imageio["ocio_config"]
|
||||
if ocio_config["override_global_config"]:
|
||||
ocio_config_path = ocio_config["filepath"][0]
|
||||
if not ocio_config_path:
|
||||
# use the default ocio config path instead
|
||||
ocio_config_path = ocio_config["filepath"][-1]
|
||||
|
||||
colorspace_mgr.OCIOConfigPath = ocio_config_path
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class OpenPypeMenu(object):
|
|||
openpype_menu.addAction(frame_action)
|
||||
|
||||
colorspace_action = QtWidgets.QAction("Set Colorspace", openpype_menu)
|
||||
colorspace_action.triggered.connect(self.colospace_setting_callback)
|
||||
colorspace_action.triggered.connect(lib.reset_colorspace())
|
||||
openpype_menu.addAction(colorspace_action)
|
||||
|
||||
return openpype_menu
|
||||
|
|
@ -152,7 +152,3 @@ class OpenPypeMenu(object):
|
|||
def frame_range_callback(self):
|
||||
"""Callback to reset frame range"""
|
||||
return lib.reset_frame_range()
|
||||
|
||||
def colospace_setting_callback(self):
|
||||
"""Callback to reset OCIO colorspace setting"""
|
||||
return lib.reset_colorspace()
|
||||
|
|
|
|||
|
|
@ -58,6 +58,10 @@ class CollectRender(pyblish.api.InstancePlugin):
|
|||
# most of the 3dsmax renderers
|
||||
# so this is currently hard coded
|
||||
# TODO: add options for redshift/vray ocio config
|
||||
instance.data["colorspaceConfig"] = ""
|
||||
instance.data["colorspaceDisplay"] = "sRGB"
|
||||
instance.data["colorspaceView"] = "ACES 1.0 SDR-video"
|
||||
|
||||
if int(get_max_version()) >= 2024:
|
||||
display_view_transform = instance.data["ocio_display_view_transform"] # noqa
|
||||
display, view_transform = display_view_transform.split("||")
|
||||
|
|
@ -66,11 +70,6 @@ class CollectRender(pyblish.api.InstancePlugin):
|
|||
instance.data["colorspaceDisplay"] = display
|
||||
instance.data["colorspaceView"] = view_transform
|
||||
|
||||
else:
|
||||
instance.data["colorspaceConfig"] = ""
|
||||
instance.data["colorspaceDisplay"] = "sRGB"
|
||||
instance.data["colorspaceView"] = "ACES 1.0 SDR-video"
|
||||
|
||||
instance.data["renderProducts"] = colorspace.ARenderProduct()
|
||||
instance.data["publishJobState"] = "Suspended"
|
||||
instance.data["attachTo"] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue