mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
maya 'ValidateRenderSettings' can handle AYON settings
This commit is contained in:
parent
a657dfac4e
commit
6ae8537983
2 changed files with 10 additions and 18 deletions
|
|
@ -281,6 +281,8 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin):
|
|||
# if so, compare its value from the one required.
|
||||
for data in cls.get_nodes(instance, renderer):
|
||||
for node in data["nodes"]:
|
||||
# Why is captured 'PublishValidationError'? How it can be
|
||||
# raised by 'cmds.getAttr(...)'?
|
||||
try:
|
||||
render_value = cmds.getAttr(
|
||||
"{}.{}".format(node, data["attribute"])
|
||||
|
|
@ -310,11 +312,16 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin):
|
|||
@classmethod
|
||||
def get_nodes(cls, instance, renderer):
|
||||
maya_settings = instance.context.data["project_settings"]["maya"]
|
||||
renderer_key = "{}_render_attributes".format(renderer)
|
||||
validation_settings = (
|
||||
maya_settings["publish"]["ValidateRenderSettings"].get(
|
||||
"{}_render_attributes".format(renderer)
|
||||
) or []
|
||||
)
|
||||
renderer_key
|
||||
)
|
||||
) or []
|
||||
validation_settings = [
|
||||
(item["type"], item["value"])
|
||||
for item in validation_settings
|
||||
]
|
||||
result = []
|
||||
for attr, values in OrderedDict(validation_settings).items():
|
||||
values = [convert_to_int_or_float(v) for v in values if v]
|
||||
|
|
|
|||
|
|
@ -336,21 +336,6 @@ def _convert_maya_project_settings(ayon_settings, output):
|
|||
# --- Publish (START) ---
|
||||
ayon_publish = ayon_maya["publish"]
|
||||
|
||||
# Extract playblast capture settings
|
||||
validate_rendern_settings = ayon_publish["ValidateRenderSettings"]
|
||||
for key in (
|
||||
"arnold_render_attributes",
|
||||
"vray_render_attributes",
|
||||
"redshift_render_attributes",
|
||||
"renderman_render_attributes",
|
||||
):
|
||||
if key not in validate_rendern_settings:
|
||||
continue
|
||||
validate_rendern_settings[key] = [
|
||||
[item["type"], item["value"]]
|
||||
for item in validate_rendern_settings[key]
|
||||
]
|
||||
|
||||
plugin_path_attributes = ayon_publish["ValidatePluginPathAttributes"]
|
||||
plugin_path_attributes["attribute"] = {
|
||||
item["name"]: item["value"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue