mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
update fetch output
This commit is contained in:
parent
ad62e1fd46
commit
1678bd5603
1 changed files with 27 additions and 0 deletions
|
|
@ -107,3 +107,30 @@ class ValidateUnrealStaticMeshName(pyblish.api.InstancePlugin,
|
|||
)
|
||||
|
||||
return invalid
|
||||
|
||||
def get_outputs(self, output_node):
|
||||
|
||||
if output_node.childTypeCategory() == hou.objNodeTypeCategory():
|
||||
out_list = [output_node]
|
||||
for child in output_node.children():
|
||||
out_list += self.get_outputs(child)
|
||||
|
||||
return out_list
|
||||
|
||||
elif output_node.childTypeCategory() == hou.sopNodeTypeCategory():
|
||||
return [output_node, self.get_obj_output(output_node)]
|
||||
|
||||
def get_obj_output(self, obj_node):
|
||||
"""Find sop output node, """
|
||||
|
||||
outputs = obj_node.subnetOutputs()
|
||||
|
||||
if not outputs:
|
||||
return
|
||||
|
||||
elif len(outputs) == 1:
|
||||
return outputs[0]
|
||||
|
||||
else:
|
||||
return min(outputs,
|
||||
key=lambda node: node.evalParm('outputidx'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue