Merge branch 'develop' into feature/OP-3506_Use-query-functions-in-openpype-lib

This commit is contained in:
Jakub Trllo 2022-06-30 16:55:52 +02:00
commit ac3f4d5a85
9 changed files with 1394 additions and 1256 deletions

View file

@ -4,6 +4,7 @@ import nuke
import copy
import pyblish.api
import six
import openpype
from openpype.hosts.nuke.api import (
@ -12,7 +13,6 @@ from openpype.hosts.nuke.api import (
get_view_process_node
)
class ExtractSlateFrame(openpype.api.Extractor):
"""Extracts movie and thumbnail with baked in luts
@ -236,6 +236,48 @@ class ExtractSlateFrame(openpype.api.Extractor):
int(slate_first_frame)
)
# Add file to representation files
# - get write node
write_node = instance.data["writeNode"]
# - evaluate filepaths for first frame and slate frame
first_filename = os.path.basename(
write_node["file"].evaluate(first_frame))
slate_filename = os.path.basename(
write_node["file"].evaluate(slate_first_frame))
# Find matching representation based on first filename
matching_repre = None
is_sequence = None
for repre in instance.data["representations"]:
files = repre["files"]
if (
not isinstance(files, six.string_types)
and first_filename in files
):
matching_repre = repre
is_sequence = True
break
elif files == first_filename:
matching_repre = repre
is_sequence = False
break
if not matching_repre:
self.log.info((
"Matching reresentaion was not found."
" Representation files were not filled with slate."
))
return
# Add frame to matching representation files
if not is_sequence:
matching_repre["files"] = [first_filename, slate_filename]
elif slate_filename not in matching_repre["files"]:
matching_repre["files"].insert(0, slate_filename)
self.log.warning("Added slate frame to representation files")
def add_comment_slate_node(self, instance, node):
comment = instance.context.data.get("comment")

View file

@ -35,6 +35,7 @@ class CollectNukeWrites(pyblish.api.InstancePlugin):
if node is None:
return
instance.data["writeNode"] = node
self.log.debug("checking instance: {}".format(instance))
# Determine defined file type

File diff suppressed because it is too large Load diff

View file

@ -710,7 +710,9 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
new_payload["JobInfo"].update(tiles_data["JobInfo"])
new_payload["PluginInfo"].update(tiles_data["PluginInfo"])
job_hash = hashlib.sha256("{}_{}".format(file_index, file))
self.log.info("hashing {} - {}".format(file_index, file))
job_hash = hashlib.sha256(
("{}_{}".format(file_index, file)).encode("utf-8"))
frame_jobs[frame] = job_hash.hexdigest()
new_payload["JobInfo"]["ExtraInfo0"] = job_hash.hexdigest()
new_payload["JobInfo"]["ExtraInfo1"] = file

View file

@ -1,3 +1,4 @@
import html
from Qt import QtCore, QtWidgets
import qtawesome
from .models import LogModel, LogsFilterProxy
@ -286,7 +287,7 @@ class OutputWidget(QtWidgets.QWidget):
if level == "debug":
line_f = (
"<font color=\"Yellow\"> -"
" <font color=\"Lime\">{{ {loggerName} }}: ["
" <font color=\"Lime\">{{ {logger_name} }}: ["
" <font color=\"White\">{message}"
" <font color=\"Lime\">]"
)
@ -299,7 +300,7 @@ class OutputWidget(QtWidgets.QWidget):
elif level == "warning":
line_f = (
"<font color=\"Yellow\">*** WRN:"
" <font color=\"Lime\"> >>> {{ {loggerName} }}: ["
" <font color=\"Lime\"> >>> {{ {logger_name} }}: ["
" <font color=\"White\">{message}"
" <font color=\"Lime\">]"
)
@ -307,16 +308,25 @@ class OutputWidget(QtWidgets.QWidget):
line_f = (
"<font color=\"Red\">!!! ERR:"
" <font color=\"White\">{timestamp}"
" <font color=\"Lime\">>>> {{ {loggerName} }}: ["
" <font color=\"Lime\">>>> {{ {logger_name} }}: ["
" <font color=\"White\">{message}"
" <font color=\"Lime\">]"
)
logger_name = log["loggerName"]
timestamp = ""
if not show_timecode:
timestamp = log["timestamp"]
message = log["message"]
exc = log.get("exception")
if exc:
log["message"] = exc["message"]
message = exc["message"]
line = line_f.format(**log)
line = line_f.format(
message=html.escape(message),
logger_name=logger_name,
timestamp=timestamp
)
if show_timecode:
timestamp = log["timestamp"]

View file

@ -6,6 +6,7 @@ from .constants import (
from .mongodb import (
AvalonMongoDB,
)
from .anatomy import Anatomy
from .create import (
BaseCreator,
@ -96,6 +97,9 @@ __all__ = (
# --- MongoDB ---
"AvalonMongoDB",
# --- Anatomy ---
"Anatomy",
# --- Create ---
"BaseCreator",
"Creator",

1257
openpype/pipeline/anatomy.py Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,20 @@
{
"load": {
"ImageSequenceLoader": {
"family": [
"shot",
"render",
"image",
"plate",
"reference"
],
"representations": [
"jpeg",
"png",
"jpg"
]
}
},
"publish": {
"CollectPalettes": {
"allowed_tasks": [

View file

@ -5,6 +5,34 @@
"label": "Harmony",
"is_file": true,
"children": [
{
"type": "dict",
"collapsible": true,
"key": "load",
"label": "Loader plugins",
"children": [
{
"type": "dict",
"collapsible": true,
"key": "ImageSequenceLoader",
"label": "Load Image Sequence",
"children": [
{
"type": "list",
"key": "family",
"label": "Families",
"object_type": "text"
},
{
"type": "list",
"key": "representations",
"label": "Representations",
"object_type": "text"
}
]
}
]
},
{
"type": "dict",
"collapsible": true,