mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merged in hotfix/eallin_fixes_nks_nk (pull request #359)
fix(nks): thumbnails, build workfile with preview mov Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
commit
321028ead8
3 changed files with 15 additions and 6 deletions
|
|
@ -963,7 +963,7 @@ class BuildWorkfile(WorkfileSettings):
|
||||||
def process(self,
|
def process(self,
|
||||||
regex_filter=None,
|
regex_filter=None,
|
||||||
version=None,
|
version=None,
|
||||||
representations=["exr", "dpx", "lutJson"]):
|
representations=["exr", "dpx", "lutJson", "mov", "preview"]):
|
||||||
"""
|
"""
|
||||||
A short description.
|
A short description.
|
||||||
|
|
||||||
|
|
@ -1020,6 +1020,8 @@ class BuildWorkfile(WorkfileSettings):
|
||||||
version=version,
|
version=version,
|
||||||
representations=representations)
|
representations=representations)
|
||||||
|
|
||||||
|
log.info("__ subsets: `{}`".format(subsets))
|
||||||
|
|
||||||
nodes_backdrop = list()
|
nodes_backdrop = list()
|
||||||
|
|
||||||
for name, subset in subsets.items():
|
for name, subset in subsets.items():
|
||||||
|
|
|
||||||
|
|
@ -196,12 +196,14 @@ class CollectPlatesData(api.InstancePlugin):
|
||||||
|
|
||||||
thumb_file = head + ".png"
|
thumb_file = head + ".png"
|
||||||
thumb_path = os.path.join(staging_dir, thumb_file)
|
thumb_path = os.path.join(staging_dir, thumb_file)
|
||||||
|
thumb_frame = instance.data["sourceIn"] + ((instance.data["sourceOut"] - instance.data["sourceIn"])/2)
|
||||||
|
|
||||||
thumbnail = item.thumbnail(instance.data["sourceIn"]).save(
|
thumbnail = item.thumbnail(thumb_frame).save(
|
||||||
thumb_path,
|
thumb_path,
|
||||||
format='png'
|
format='png'
|
||||||
)
|
)
|
||||||
self.log.debug("__ thumbnail: {}".format(thumbnail))
|
self.log.debug("__ sourceIn: `{}`".format(instance.data["sourceIn"]))
|
||||||
|
self.log.debug("__ thumbnail: `{}`, frame: `{}`".format(thumbnail, thumb_frame))
|
||||||
|
|
||||||
thumb_representation = {
|
thumb_representation = {
|
||||||
'files': thumb_file,
|
'files': thumb_file,
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,6 @@ class CollectReviews(api.InstancePlugin):
|
||||||
|
|
||||||
def create_thumbnail(self, instance):
|
def create_thumbnail(self, instance):
|
||||||
item = instance.data["item"]
|
item = instance.data["item"]
|
||||||
source_in = instance.data["sourceIn"]
|
|
||||||
|
|
||||||
source_path = instance.data["sourcePath"]
|
source_path = instance.data["sourcePath"]
|
||||||
source_file = os.path.basename(source_path)
|
source_file = os.path.basename(source_path)
|
||||||
|
|
@ -119,11 +118,17 @@ class CollectReviews(api.InstancePlugin):
|
||||||
thumb_file = head + ".png"
|
thumb_file = head + ".png"
|
||||||
thumb_path = os.path.join(staging_dir, thumb_file)
|
thumb_path = os.path.join(staging_dir, thumb_file)
|
||||||
self.log.debug("__ thumb_path: {}".format(thumb_path))
|
self.log.debug("__ thumb_path: {}".format(thumb_path))
|
||||||
self.log.debug("__ source_in: {}".format(source_in))
|
|
||||||
thumbnail = item.thumbnail(source_in).save(
|
thumb_frame = instance.data["sourceIn"] + ((instance.data["sourceOut"] - instance.data["sourceIn"])/2)
|
||||||
|
|
||||||
|
thumbnail = item.thumbnail(thumb_frame).save(
|
||||||
thumb_path,
|
thumb_path,
|
||||||
format='png'
|
format='png'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.log.debug("__ sourceIn: `{}`".format(instance.data["sourceIn"]))
|
||||||
|
self.log.debug("__ thumbnail: `{}`, frame: `{}`".format(thumbnail, thumb_frame))
|
||||||
|
|
||||||
self.log.debug("__ thumbnail: {}".format(thumbnail))
|
self.log.debug("__ thumbnail: {}".format(thumbnail))
|
||||||
|
|
||||||
thumb_representation = {
|
thumb_representation = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue