Merge branch '2.x/develop' into feature/102-_draft_Celaction_quick_integration

This commit is contained in:
Milan Kolar 2020-06-10 18:18:52 +02:00
commit b906dabf2c
147 changed files with 13798 additions and 1518 deletions

View file

@ -1,22 +0,0 @@
"""
Requires:
config_data -> ftrack.output_representation
Provides:
context -> output_repre_config (str)
"""
import pyblish.api
from pype.api import config
class CollectOutputRepreConfig(pyblish.api.ContextPlugin):
"""Inject the current working file into context"""
order = pyblish.api.CollectorOrder
label = "Collect Config for representation"
hosts = ["shell", "standalonepublisher"]
def process(self, context):
config_data = config.get_presets()["ftrack"]["output_representation"]
context.data['output_repre_config'] = config_data

View file

@ -14,18 +14,28 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin):
families = ["imagesequence", "render", "render2d", "source"]
enabled = False
def process(self, instance):
# presetable attribute
ffmpeg_args = None
def process(self, instance):
self.log.info("subset {}".format(instance.data['subset']))
if 'crypto' in instance.data['subset']:
return
# ffmpeg doesn't support multipart exrs
if instance.data.get("multipartExr") is True:
return
# get representation and loop them
representations = instance.data["representations"]
# filter out mov and img sequences
representations_new = representations[:]
if instance.data.get("multipartExr"):
# ffmpeg doesn't support multipart exrs
return
for repre in representations:
tags = repre.get("tags", [])
self.log.debug(repre)
@ -33,11 +43,7 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin):
if not valid:
continue
if not isinstance(repre['files'], list):
continue
if instance.data.get("multipartExr") is True:
# ffmpeg doesn't support multipart exrs
if not isinstance(repre['files'], (list, tuple)):
continue
stagingdir = os.path.normpath(repre.get("stagingDir"))
@ -57,21 +63,19 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin):
self.log.info("output {}".format(full_output_path))
config_data = instance.context.data['output_repre_config']
proj_name = os.environ.get('AVALON_PROJECT', '__default__')
profile = config_data.get(proj_name, config_data['__default__'])
ffmpeg_path = pype.lib.get_ffmpeg_tool_path("ffmpeg")
ffmpeg_args = self.ffmpeg_args or {}
jpeg_items = []
jpeg_items.append(ffmpeg_path)
# override file if already exists
jpeg_items.append("-y")
# use same input args like with mov
jpeg_items.extend(profile.get('input', []))
jpeg_items.extend(ffmpeg_args.get("input") or [])
# input file
jpeg_items.append("-i {}".format(full_input_path))
# output arguments from presets
jpeg_items.extend(ffmpeg_args.get("output") or [])
# output file
jpeg_items.append(full_output_path)

View file

@ -76,7 +76,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
"gizmo",
"source",
"matchmove",
"image"
"image",
"source",
"assembly",
"fbx",