From 2e3dbaf047c44c80758ab3dc77fddd1fd2473f5c Mon Sep 17 00:00:00 2001 From: wikoreman Date: Mon, 22 Oct 2018 12:00:51 +0200 Subject: [PATCH] Fixed logging issue, return validation result, changed decorator to staticmethod --- .../publish/validate_vray_translator_settings.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/colorbleed/plugins/maya/publish/validate_vray_translator_settings.py b/colorbleed/plugins/maya/publish/validate_vray_translator_settings.py index 7f2c58aca5..2a7c1584b1 100644 --- a/colorbleed/plugins/maya/publish/validate_vray_translator_settings.py +++ b/colorbleed/plugins/maya/publish/validate_vray_translator_settings.py @@ -39,17 +39,22 @@ class ValidateVRayTranslatorEnabled(pyblish.api.ContextPlugin): node = vray_settings[0] if not cmds.getAttr("{}.vrscene_on".format(node)): - self.info.error("Export vrscene not enabled") + cls.log.error("Export vrscene not enabled") + invalid = True if not cmds.getAttr("{}.misc_eachFrameInFile".format(node)): - self.info.error("Each Frame in File not enabled") + cls.log.error("Each Frame in File not enabled") + invalid = True vrscene_filename = cmds.getAttr("{}.vrscene_filename".format(node)) if vrscene_filename != "vrayscene//_/": - self.info.error("Template for file name is wrong") + cls.log.error("Template for file name is wrong") + invalid = True - @classmethod - def repair(cls, context): + return invalid + + @staticmethod + def repair(): vray_settings = cmds.ls(type="VRaySettingsNode") if not vray_settings: