mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
♻️ some code style changes
This commit is contained in:
parent
c54eaa197e
commit
1e3fad27b0
3 changed files with 17 additions and 22 deletions
|
|
@ -39,12 +39,15 @@ class CreateRedshiftROP(plugin.HoudiniCreator):
|
|||
# Also create the linked Redshift IPR Rop
|
||||
try:
|
||||
ipr_rop = instance_node.parent().createNode(
|
||||
"Redshift_IPR", node_name=basename + "_IPR"
|
||||
"Redshift_IPR", node_name=f"{basename}_IPR"
|
||||
)
|
||||
except hou.OperationFailed:
|
||||
except hou.OperationFailed as e:
|
||||
raise plugin.OpenPypeCreatorError(
|
||||
("Cannot create Redshift node. Is Redshift "
|
||||
"installed and enabled?"))
|
||||
(
|
||||
"Cannot create Redshift node. Is Redshift "
|
||||
"installed and enabled?"
|
||||
)
|
||||
) from e
|
||||
|
||||
# Move it to directly under the Redshift ROP
|
||||
ipr_rop.setPosition(instance_node.position() + hou.Vector2(0, -1))
|
||||
|
|
@ -77,22 +80,16 @@ class CreateRedshiftROP(plugin.HoudiniCreator):
|
|||
for node in self.selected_nodes:
|
||||
if node.type().name() == "cam":
|
||||
camera = node.path()
|
||||
parms.update({
|
||||
"RS_renderCamera": camera or ""})
|
||||
parms["RS_renderCamera"] = camera or ""
|
||||
|
||||
rs_filepath = \
|
||||
"{export_dir}{subset_name}/{subset_name}.$F4.rs".format(
|
||||
export_dir=hou.text.expandString("$HIP/pyblish/rs/"),
|
||||
subset_name=subset_name,
|
||||
)
|
||||
export_dir=hou.text.expandString("$HIP/pyblish/rs/")
|
||||
rs_filepath = f"{export_dir}{subset_name}/{subset_name}.$F4.rs"
|
||||
parms["RS_archive_file"] = rs_filepath
|
||||
|
||||
instance_node.setParms(parms)
|
||||
if pre_create_data.get("split_render", self.split_render):
|
||||
parms["RS_archive_enable"] = 1
|
||||
|
||||
|
||||
instance_node.setParms(parms)
|
||||
|
||||
# Lock some Avalon attributes
|
||||
to_lock = ["family", "id"]
|
||||
self.lock_parameters(instance_node, to_lock)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin):
|
|||
families = ["redshift_rop"]
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
rop = hou.node(instance.data.get("instance_node"))
|
||||
|
||||
# Collect chunkSize
|
||||
|
|
@ -43,8 +42,6 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin):
|
|||
|
||||
default_prefix = evalParmNoFrame(rop, "RS_outputFileNamePrefix")
|
||||
beauty_suffix = rop.evalParm("RS_outputBeautyAOVSuffix")
|
||||
render_products = []
|
||||
|
||||
# Store whether we are splitting the render job (export + render)
|
||||
split_render = bool(rop.parm("RS_archive_enable").eval())
|
||||
instance.data["splitRender"] = split_render
|
||||
|
|
@ -67,7 +64,7 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin):
|
|||
beauty_product = self.get_render_product_name(
|
||||
prefix=default_prefix, suffix=beauty_suffix
|
||||
)
|
||||
render_products.append(beauty_product)
|
||||
render_products = [beauty_product]
|
||||
files_by_aov = {
|
||||
"_": self.generate_expected_files(instance,
|
||||
beauty_product)}
|
||||
|
|
@ -77,11 +74,11 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin):
|
|||
i = index + 1
|
||||
|
||||
# Skip disabled AOVs
|
||||
if not rop.evalParm("RS_aovEnable_%s" % i):
|
||||
if not rop.evalParm(f"RS_aovEnable_{i}"):
|
||||
continue
|
||||
|
||||
aov_suffix = rop.evalParm("RS_aovSuffix_%s" % i)
|
||||
aov_prefix = evalParmNoFrame(rop, "RS_aovCustomPrefix_%s" % i)
|
||||
aov_suffix = rop.evalParm(f"RS_aovSuffix_{i}")
|
||||
aov_prefix = evalParmNoFrame(rop, f"RS_aovCustomPrefix_{i}")
|
||||
if not aov_prefix:
|
||||
aov_prefix = default_prefix
|
||||
|
||||
|
|
@ -103,7 +100,7 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin):
|
|||
instance.data["attachTo"] = [] # stub required data
|
||||
|
||||
if "expectedFiles" not in instance.data:
|
||||
instance.data["expectedFiles"] = list()
|
||||
instance.data["expectedFiles"] = []
|
||||
instance.data["expectedFiles"].append(files_by_aov)
|
||||
|
||||
# update the colorspace data
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ from openpype.lib import (
|
|||
NumberDef
|
||||
)
|
||||
|
||||
|
||||
@attr.s
|
||||
class DeadlinePluginInfo():
|
||||
SceneFile = attr.ib(default=None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue