mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Use a general family for houdini farm rendering
This commit is contained in:
parent
c131071c7d
commit
941e80dd95
5 changed files with 35 additions and 9 deletions
|
|
@ -0,0 +1,23 @@
|
||||||
|
import pyblish.api
|
||||||
|
|
||||||
|
|
||||||
|
class CollectFarmInstances(pyblish.api.InstancePlugin):
|
||||||
|
"""Collect instances for farm render."""
|
||||||
|
|
||||||
|
order = pyblish.api.CollectorOrder
|
||||||
|
families = ["mantra_rop"]
|
||||||
|
|
||||||
|
hosts = ["houdini"]
|
||||||
|
targets = ["local", "remote"]
|
||||||
|
label = "Collect farm instances"
|
||||||
|
|
||||||
|
def process(self, instance):
|
||||||
|
creator_attribute = instance.data["creator_attributes"]
|
||||||
|
farm_enabled = creator_attribute["farm"]
|
||||||
|
instance.data["farm"] = farm_enabled
|
||||||
|
if not farm_enabled:
|
||||||
|
self.log.debug("Render on farm is disabled. "
|
||||||
|
"Skipping farm collecting.")
|
||||||
|
return
|
||||||
|
|
||||||
|
instance.data["families"].append("render.farm.hou")
|
||||||
|
|
@ -3,7 +3,7 @@ import pyblish.api
|
||||||
from ayon_core.lib import version_up
|
from ayon_core.lib import version_up
|
||||||
from ayon_core.pipeline import registered_host
|
from ayon_core.pipeline import registered_host
|
||||||
from ayon_core.pipeline.publish import get_errored_plugins_from_context
|
from ayon_core.pipeline.publish import get_errored_plugins_from_context
|
||||||
from ayon_core.hosts.houdini.api import HoudiniHost
|
|
||||||
from ayon_core.pipeline.publish import KnownPublishError
|
from ayon_core.pipeline.publish import KnownPublishError
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -20,9 +20,9 @@ class IncrementCurrentFile(pyblish.api.ContextPlugin):
|
||||||
families = ["workfile",
|
families = ["workfile",
|
||||||
"redshift_rop",
|
"redshift_rop",
|
||||||
"arnold_rop",
|
"arnold_rop",
|
||||||
"mantra_rop",
|
|
||||||
"karma_rop",
|
"karma_rop",
|
||||||
"usdrender",
|
"usdrender",
|
||||||
|
"render.farm.hou",
|
||||||
"publish.hou"]
|
"publish.hou"]
|
||||||
optional = True
|
optional = True
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,9 +43,9 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin,
|
||||||
"usdrender",
|
"usdrender",
|
||||||
"redshift_rop",
|
"redshift_rop",
|
||||||
"arnold_rop",
|
"arnold_rop",
|
||||||
"mantra_rop",
|
|
||||||
"karma_rop",
|
"karma_rop",
|
||||||
"vray_rop",
|
"vray_rop",
|
||||||
|
"render.farm.hou",
|
||||||
"publish.hou"]
|
"publish.hou"]
|
||||||
|
|
||||||
primary_pool = None
|
primary_pool = None
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,9 @@ class HoudiniSubmitDeadline(
|
||||||
families = ["usdrender",
|
families = ["usdrender",
|
||||||
"redshift_rop",
|
"redshift_rop",
|
||||||
"arnold_rop",
|
"arnold_rop",
|
||||||
"mantra_rop",
|
|
||||||
"karma_rop",
|
"karma_rop",
|
||||||
"vray_rop"]
|
"vray_rop",
|
||||||
|
"render.farm.hou"]
|
||||||
targets = ["local"]
|
targets = ["local"]
|
||||||
use_published = True
|
use_published = True
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ class HoudiniSubmitDeadline(
|
||||||
priority = 50
|
priority = 50
|
||||||
chunk_size = 1
|
chunk_size = 1
|
||||||
group = ""
|
group = ""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_attribute_defs(cls):
|
def get_attribute_defs(cls):
|
||||||
return [
|
return [
|
||||||
|
|
@ -194,7 +194,7 @@ class HoudiniSubmitDeadline(
|
||||||
|
|
||||||
job_info.Pool = instance.data.get("primaryPool")
|
job_info.Pool = instance.data.get("primaryPool")
|
||||||
job_info.SecondaryPool = instance.data.get("secondaryPool")
|
job_info.SecondaryPool = instance.data.get("secondaryPool")
|
||||||
|
|
||||||
if split_render_job and is_export_job:
|
if split_render_job and is_export_job:
|
||||||
job_info.Priority = attribute_values.get(
|
job_info.Priority = attribute_values.get(
|
||||||
"export_priority", self.export_priority
|
"export_priority", self.export_priority
|
||||||
|
|
@ -265,11 +265,14 @@ class HoudiniSubmitDeadline(
|
||||||
# Output driver to render
|
# Output driver to render
|
||||||
if job_type == "render":
|
if job_type == "render":
|
||||||
product_type = instance.data.get("productType")
|
product_type = instance.data.get("productType")
|
||||||
|
rop_node = hou.node(instance.data.get("instance_node"))
|
||||||
|
node_type = rop_node.type().name()
|
||||||
|
|
||||||
if product_type == "arnold_rop":
|
if product_type == "arnold_rop":
|
||||||
plugin_info = ArnoldRenderDeadlinePluginInfo(
|
plugin_info = ArnoldRenderDeadlinePluginInfo(
|
||||||
InputFile=instance.data["ifdFile"]
|
InputFile=instance.data["ifdFile"]
|
||||||
)
|
)
|
||||||
elif product_type == "mantra_rop":
|
elif node_type == "ifd":
|
||||||
plugin_info = MantraRenderDeadlinePluginInfo(
|
plugin_info = MantraRenderDeadlinePluginInfo(
|
||||||
SceneFile=instance.data["ifdFile"],
|
SceneFile=instance.data["ifdFile"],
|
||||||
Version=hou_major_minor,
|
Version=hou_major_minor,
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin,
|
||||||
"prerender.farm", "prerender.frames_farm",
|
"prerender.farm", "prerender.frames_farm",
|
||||||
"renderlayer", "imagesequence",
|
"renderlayer", "imagesequence",
|
||||||
"vrayscene", "maxrender",
|
"vrayscene", "maxrender",
|
||||||
"arnold_rop", "mantra_rop",
|
"arnold_rop", "render.farm.hou",
|
||||||
"karma_rop", "vray_rop",
|
"karma_rop", "vray_rop",
|
||||||
"redshift_rop"]
|
"redshift_rop"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue