resolve some conversations

This commit is contained in:
Mustafa-Zarkash 2023-08-09 20:34:05 +03:00
parent ad1097272d
commit c8e66fd632
3 changed files with 14 additions and 10 deletions

View file

@ -4,6 +4,9 @@ from openpype.pipeline import PublishValidationError
from openpype.pipeline.publish import RepairAction
from openpype.hosts.houdini.api.action import SelectROPAction
import os
import hou
class SetDefaultViewSpaceAction(RepairAction):
label = "Set default view space"
@ -32,8 +35,6 @@ class ValidateReviewColorspace(pyblish.api.InstancePlugin):
@classmethod
def get_invalid(cls, instance):
import hou # noqa
import os
rop_node = hou.node(instance.data["instance_node"])
if os.getenv("OCIO") is None:
@ -70,16 +71,15 @@ class ValidateReviewColorspace(pyblish.api.InstancePlugin):
used to set colorspace on opengl node to the default view.
"""
import hou
from openpype.pipeline.colorspace import get_display_view_colorspace_name #noqa
from openpype.hosts.houdini.api.lib import get_color_management_preferences #noqa
from openpype.pipeline.colorspace import get_display_view_colorspace_name # noqa
from openpype.hosts.houdini.api.lib import get_color_management_preferences # noqa
rop_node = hou.node(instance.data["instance_node"])
data = get_color_management_preferences()
data = get_color_management_preferences()
config_path = data.get("config")
display = data.get("display")
view = data.get("view")
display = data.get("display")
view = data.get("view")
cls.log.debug("Get default view colorspace name..")

View file

@ -590,6 +590,7 @@ def _get_imageio_settings(project_settings, host_name):
return imageio_global, imageio_host
def get_display_view_colorspace_name(config_path, display, view):
"""get view colorspace name for the given display and view.
@ -608,10 +609,11 @@ def get_display_view_colorspace_name(config_path, display, view):
return get_display_view_colorspace_subprocess(config_path,
display, view)
from openpype.scripts.ocio_wrapper import _get_display_view_colorspace_name #noqa
from openpype.scripts.ocio_wrapper import _get_display_view_colorspace_name # noqa
return _get_display_view_colorspace_name(config_path, display, view)
def get_display_view_colorspace_subprocess(config_path, display, view):
"""get view colorspace name for the given display and view
via subprocess.

View file

@ -173,6 +173,7 @@ def _get_views_data(config_path):
return data
def _get_display_view_colorspace_name(config_path, display, view):
"""get view colorspace name for the given display and view.
@ -199,6 +200,7 @@ def _get_display_view_colorspace_name(config_path, display, view):
return colorspace
@config.command(
name="get_display_view_colorspace_name",
help=(
@ -223,7 +225,7 @@ def get_display_view_colorspace_name(in_path, out_path,
display, view):
"""Aggregate view colorspace name to file.
Python 2 wrapped console command
Wrapper command for processes without acces to OpenColorIO
Args:
in_path (str): config file path string