mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Fixed deadline validator to check compositor tree output
This commit is contained in:
parent
5858b26bfe
commit
44282f86df
1 changed files with 17 additions and 5 deletions
|
|
@ -28,15 +28,27 @@ class ValidateDeadlinePublish(pyblish.api.InstancePlugin,
|
||||||
def process(self, instance):
|
def process(self, instance):
|
||||||
if not self.is_active(instance.data):
|
if not self.is_active(instance.data):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
tree = bpy.context.scene.node_tree
|
||||||
|
output_type = "CompositorNodeOutputFile"
|
||||||
|
output_node = None
|
||||||
|
# Remove all output nodes that inlcude "AYON" in the name.
|
||||||
|
# There should be only one.
|
||||||
|
for node in tree.nodes:
|
||||||
|
if node.bl_idname == output_type and "AYON" in node.name:
|
||||||
|
output_node = node
|
||||||
|
break
|
||||||
|
if not output_node:
|
||||||
|
raise PublishValidationError(
|
||||||
|
"No output node found in the compositor tree."
|
||||||
|
)
|
||||||
filepath = bpy.data.filepath
|
filepath = bpy.data.filepath
|
||||||
file = os.path.basename(filepath)
|
file = os.path.basename(filepath)
|
||||||
filename, ext = os.path.splitext(file)
|
filename, ext = os.path.splitext(file)
|
||||||
if filename not in bpy.context.scene.render.filepath:
|
if filename not in output_node.base_path:
|
||||||
raise PublishValidationError(
|
raise PublishValidationError(
|
||||||
"Render output folder "
|
"Render output folder doesn't match the blender scene name! "
|
||||||
"doesn't match the blender scene name! "
|
"Use Repair action to fix the folder file path."
|
||||||
"Use Repair action to "
|
|
||||||
"fix the folder file path."
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue