Skip to content

remove_ouput_node

RemoveOutputNode

Bases: ContextPlugin

Removing output node for each output write node

Source code in client/ayon_nuke/plugins/publish/remove_ouput_node.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class RemoveOutputNode(pyblish.api.ContextPlugin):
    """Removing output node for each output write node

    """
    label = 'Output Node Remove'
    order = pyblish.api.IntegratorOrder + 0.4
    families = ["workfile"]
    hosts = ["nuke"]

    settings_category = "nuke"

    def process(self, context):
        try:
            output_node = context.data["outputNode"]
            name = output_node["name"].value()
            self.log.info("Removing output node: '{}'".format(name))

            nuke.delete(output_node)
        except Exception:
            return