Merge branch 'develop' into bugfix/OP-5944_nuke_few_fixes

This commit is contained in:
Jakub Ježek 2023-06-09 14:00:57 +02:00 committed by GitHub
commit f833bf4f04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 56 additions and 19 deletions

View file

@ -6,7 +6,7 @@ from operator import attrgetter
import json
from openpype.host import HostBase, IWorkfileHost, ILoadHost, INewPublisher
from openpype.host import HostBase, IWorkfileHost, ILoadHost, IPublishHost
import pyblish.api
from openpype.pipeline import (
register_creator_plugin_path,
@ -28,7 +28,7 @@ CREATE_PATH = os.path.join(PLUGINS_DIR, "create")
INVENTORY_PATH = os.path.join(PLUGINS_DIR, "inventory")
class MaxHost(HostBase, IWorkfileHost, ILoadHost, INewPublisher):
class MaxHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost):
name = "max"
menu = None

View file

@ -364,6 +364,17 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin):
cmds.setAttr("defaultRenderGlobals.animation", True)
# Repair prefix
if renderer == "arnold":
multipart = cmds.getAttr("defaultArnoldDriver.mergeAOVs")
if multipart:
separator_variations = [
"_<RenderPass>",
"<RenderPass>_",
"<RenderPass>",
]
for variant in separator_variations:
default_prefix = default_prefix.replace(variant, "")
if renderer != "renderman":
node = render_attrs["node"]
prefix_attr = render_attrs["prefix"]

View file

@ -487,7 +487,22 @@ or updating already created. Publishing will create OTIO file.
)
# get video stream data
video_stream = media_data["streams"][0]
video_streams = []
audio_streams = []
for stream in media_data["streams"]:
codec_type = stream.get("codec_type")
if codec_type == "audio":
audio_streams.append(stream)
elif codec_type == "video":
video_streams.append(stream)
if not video_streams:
raise ValueError(
"Could not find video stream in source file."
)
video_stream = video_streams[0]
return_data = {
"video": True,
"start_frame": 0,
@ -500,12 +515,7 @@ or updating already created. Publishing will create OTIO file.
}
# get audio streams data
audio_stream = [
stream for stream in media_data["streams"]
if stream["codec_type"] == "audio"
]
if audio_stream:
if audio_streams:
return_data["audio"] = True
except Exception as exc: