From 39fde42c407efaa6bf9d361dbbd86fd6285a80a0 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 21 Dec 2018 16:00:16 +0100 Subject: [PATCH] Remove duplicate plug-in functionality - This is replaced by validate_output_node.py --- .../publish/validate_outnode_exists.py | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 colorbleed/plugins/houdini/publish/validate_outnode_exists.py diff --git a/colorbleed/plugins/houdini/publish/validate_outnode_exists.py b/colorbleed/plugins/houdini/publish/validate_outnode_exists.py deleted file mode 100644 index ff682ee820..0000000000 --- a/colorbleed/plugins/houdini/publish/validate_outnode_exists.py +++ /dev/null @@ -1,52 +0,0 @@ -import pyblish.api -import colorbleed.api - - -class ValidatOutputNodeExists(pyblish.api.InstancePlugin): - """Validate if node attribute Create intermediate Directories is turned on - - Rules: - * The node must have Create intermediate Directories turned on to - ensure the output file will be created - - """ - - order = colorbleed.api.ValidateContentsOrder - families = ["*"] - hosts = ['houdini'] - label = "Output Node Exists" - - def process(self, instance): - invalid = self.get_invalid(instance) - if invalid: - raise RuntimeError("Could not find output node(s)!") - - @classmethod - def get_invalid(cls, instance): - - import hou - - result = set() - - node = instance[0] - assert node, "No node in instance. This is a bug." - - if node.type().name() == "alembic": - soppath_parm = "sop_path" - else: - # Fall back to geometry node - soppath_parm = "soppath" - - sop_path = node.parm(soppath_parm).eval() - output_node = hou.node(sop_path) - - if output_node is None: - cls.log.error("Node at '%s' does not exist" % sop_path) - result.add(node.path()) - - # Added cam as this is a legit output type (cameras can't - if output_node.type().name() not in ["output", "cam"]: - cls.log.error("SOP Path does not end path at output node") - result.add(node.path()) - - return result