From d1d6064e1ea8cf60e77caec37a397766ae820e3c Mon Sep 17 00:00:00 2001 From: wikoreman Date: Wed, 19 Sep 2018 10:50:02 +0200 Subject: [PATCH] Improved validator to accept node type camera --- .../houdini/publish/validate_output_node.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/colorbleed/plugins/houdini/publish/validate_output_node.py b/colorbleed/plugins/houdini/publish/validate_output_node.py index be7551cf0d..18fcb4898f 100644 --- a/colorbleed/plugins/houdini/publish/validate_output_node.py +++ b/colorbleed/plugins/houdini/publish/validate_output_node.py @@ -31,13 +31,15 @@ class ValidateOutputNode(pyblish.api.InstancePlugin): return node.path() # Check if type is correct - if output_node.type().name() != "output": - cls.log.error("Output node `%s` is not if type `output`" % + type_name = output_node.type().name() + if type_name not in ["output", "cam"]: + cls.log.error("Output node `%s` is an accepted type `output` " + "or `camera`" % output_node.path()) - return output_node.path() + return [output_node.path()] - # Check if node has incoming connections - if not output_node.inputConnections(): + # Check if output node has incoming connections + if type_name == "output" and not output_node.inputConnections(): cls.log.error("Output node `%s` has no incoming connections" % output_node.path()) - return output_node.path() + return [output_node.path()]