mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
move import inside
This commit is contained in:
parent
c92541f5d4
commit
2919d241da
2 changed files with 5 additions and 9 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
"""Creator plugin for creating openGL reviews."""
|
"""Creator plugin for creating openGL reviews."""
|
||||||
from openpype.hosts.houdini.api import plugin
|
from openpype.hosts.houdini.api import plugin
|
||||||
from openpype.lib import EnumDef, BoolDef, NumberDef
|
from openpype.lib import EnumDef, BoolDef, NumberDef
|
||||||
from openpype.hosts.houdini.api.colorspace import get_default_display_view_colorspace # noqa
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import hou
|
import hou
|
||||||
|
|
@ -87,7 +86,8 @@ class CreateReview(plugin.HoudiniCreator):
|
||||||
|
|
||||||
# Set OCIO Colorspace to the default output colorspace
|
# Set OCIO Colorspace to the default output colorspace
|
||||||
# if there's OCIO
|
# if there's OCIO
|
||||||
self.set_colorcorrect_to_default_view_space(instance_node)
|
if os.getenv("OCIO"):
|
||||||
|
self.set_colorcorrect_to_default_view_space(instance_node)
|
||||||
|
|
||||||
to_lock = ["id", "family"]
|
to_lock = ["id", "family"]
|
||||||
|
|
||||||
|
|
@ -134,13 +134,9 @@ class CreateReview(plugin.HoudiniCreator):
|
||||||
def set_colorcorrect_to_default_view_space(self,
|
def set_colorcorrect_to_default_view_space(self,
|
||||||
instance_node):
|
instance_node):
|
||||||
"""Set ociocolorspace to the default output space."""
|
"""Set ociocolorspace to the default output space."""
|
||||||
|
from openpype.hosts.houdini.api.colorspace import get_default_display_view_colorspace # noqa
|
||||||
|
|
||||||
if os.getenv("OCIO") is None:
|
# set Color Correction parameter to OpenColorIO
|
||||||
# No OCIO, skip setting ociocolorspace
|
|
||||||
return
|
|
||||||
|
|
||||||
# if there's OCIO then set Color Correction parameter
|
|
||||||
# to OpenColorIO
|
|
||||||
instance_node.setParms({"colorcorrect": 2})
|
instance_node.setParms({"colorcorrect": 2})
|
||||||
|
|
||||||
# Get default view space for ociocolorspace parm.
|
# Get default view space for ociocolorspace parm.
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ from openpype.pipeline import (
|
||||||
)
|
)
|
||||||
from openpype.pipeline.publish import RepairAction
|
from openpype.pipeline.publish import RepairAction
|
||||||
from openpype.hosts.houdini.api.action import SelectROPAction
|
from openpype.hosts.houdini.api.action import SelectROPAction
|
||||||
from openpype.hosts.houdini.api.colorspace import get_default_display_view_colorspace # noqa
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import hou
|
import hou
|
||||||
|
|
@ -69,6 +68,7 @@ class ValidateReviewColorspace(pyblish.api.InstancePlugin,
|
||||||
It is a helper action more than a repair action,
|
It is a helper action more than a repair action,
|
||||||
used to set colorspace on opengl node to the default view.
|
used to set colorspace on opengl node to the default view.
|
||||||
"""
|
"""
|
||||||
|
from openpype.hosts.houdini.api.colorspace import get_default_display_view_colorspace # noqa
|
||||||
|
|
||||||
rop_node = hou.node(instance.data["instance_node"])
|
rop_node = hou.node(instance.data["instance_node"])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue