mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
imporve code logic
This commit is contained in:
parent
bff416ecad
commit
7db14f47c1
3 changed files with 12 additions and 5 deletions
|
|
@ -24,8 +24,9 @@ class SetDefaultDisplayView(PreLaunchHook):
|
|||
if not OCIO:
|
||||
return
|
||||
|
||||
# workfile settings added in '0.2.13'
|
||||
houdini_color_settings = \
|
||||
self.data["project_settings"]["houdini"]["imageio"].get("workfile", {})
|
||||
self.data["project_settings"]["houdini"]["imageio"].get("workfile")
|
||||
|
||||
if not houdini_color_settings:
|
||||
self.log.info("Hook 'SetDefaultDisplayView' requires Houdini "
|
||||
|
|
|
|||
|
|
@ -18,8 +18,11 @@ class CreateReview(plugin.HoudiniCreator):
|
|||
|
||||
def apply_settings(self, project_settings):
|
||||
super(CreateReview, self).apply_settings(project_settings)
|
||||
color_settings = project_settings["houdini"]["imageio"].get("workfile", {})
|
||||
if color_settings and color_settings["enabled"]:
|
||||
# workfile settings added in '0.2.13'
|
||||
color_settings = project_settings["houdini"]["imageio"].get(
|
||||
"workfile", {}
|
||||
)
|
||||
if not color_settings.get("enabled"):
|
||||
self.review_color_space = color_settings.get("review_color_space")
|
||||
|
||||
def create(self, product_name, instance_data, pre_create_data):
|
||||
|
|
|
|||
|
|
@ -45,9 +45,12 @@ class ValidateReviewColorspace(pyblish.api.InstancePlugin,
|
|||
category="houdini")
|
||||
apply_plugin_settings_automatically(cls, settings, logger=cls.log)
|
||||
|
||||
# workfile settings added in '0.2.13'
|
||||
color_settings = project_settings["houdini"]["imageio"].get(
|
||||
"workfile", {}
|
||||
)
|
||||
# Add review color settings
|
||||
color_settings = project_settings["houdini"]["imageio"].get("workfile", {})
|
||||
if color_settings and color_settings["enabled"]:
|
||||
if not color_settings.get("enabled"):
|
||||
cls.review_color_space = color_settings.get("review_color_space")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue