Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/2.13.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
mkolar committed Nov 15, 2020
2 parents 37ea64c + 9e45fbf commit ca251a8
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 51 deletions.
2 changes: 1 addition & 1 deletion pype/plugins/global/publish/extract_burnin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ExtractBurnin(pype.api.Extractor):
"hiero",
"premiere",
"standalonepublisher",
"harmony"
"harmony",
"fusion"
]
optional = True
Expand Down
13 changes: 9 additions & 4 deletions pype/plugins/global/publish/submit_publish_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
deadline_pool_secondary = ""
deadline_group = ""
deadline_chunk_size = 1
deadline_priority = None

# regex for finding frame number in string
R_FRAME_NUMBER = re.compile(r'.+\.(?P<frame>[0-9]+)\..+')
Expand Down Expand Up @@ -902,7 +903,11 @@ def process(self, instance):
render_job["Props"]["User"] = context.data.get(
"deadlineUser", getpass.getuser())
# Priority is now not handled at all
render_job["Props"]["Pri"] = instance.data.get("priority")

if self.deadline_priority:
render_job["Props"]["Pri"] = self.deadline_priority
else:
render_job["Props"]["Pri"] = instance.data.get("priority")

render_job["Props"]["Env"] = {
"FTRACK_API_USER": os.environ.get("FTRACK_API_USER"),
Expand Down Expand Up @@ -1033,8 +1038,8 @@ def _get_publish_folder(self, anatomy, template_data,

anatomy_filled = anatomy.format(template_data)

if "folder" in anatomy.templates["publish"]:
publish_folder = anatomy_filled["publish"]["folder"]
if "folder" in anatomy.templates["render"]:
publish_folder = anatomy_filled["render"]["folder"]
else:
# solve deprecated situation when `folder` key is not underneath
# `publish` anatomy
Expand All @@ -1044,7 +1049,7 @@ def _get_publish_folder(self, anatomy, template_data,
" key underneath `publish` (in global of for project `{}`)."
).format(project_name))

file_path = anatomy_filled["publish"]["path"]
file_path = anatomy_filled["render"]["path"]
# Directory
publish_folder = os.path.dirname(file_path)

Expand Down
2 changes: 1 addition & 1 deletion pype/plugins/harmony/publish/extract_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def process(self, instance):
thumbnail_path = os.path.join(path, "thumbnail.png")
ffmpeg_path = pype.lib.get_ffmpeg_tool_path("ffmpeg")
args = [
"\"{}\"".format(ffmpeg_path), "-y",
"{}".format(ffmpeg_path), "-y",
"-i", os.path.join(path, list(collections[0])[0]),
"-vf", "scale=300:-1",
"-vframes", "1",
Expand Down
3 changes: 2 additions & 1 deletion pype/plugins/maya/publish/collect_ftrack_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class CollectFtrackFamilies(pyblish.api.InstancePlugin):
"model",
"animation",
"look",
"rig"
"rig",
"camera"
]

def process(self, instance):
Expand Down
7 changes: 6 additions & 1 deletion pype/plugins/maya/publish/collect_remove_marked.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ class CollectRemoveMarked(pyblish.api.ContextPlugin):

def process(self, context):

self.log.debug(context)
# make ftrack publishable
instances_to_remove = []
for instance in context:
if instance.data.get('remove'):
context.remove(instance)
instances_to_remove.append(instance)

for instance in instances_to_remove:
context.remove(instance)
4 changes: 4 additions & 0 deletions pype/plugins/maya/publish/collect_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ def process(self, context):
if self.sync_workfile_version:
data["version"] = context.data["version"]

for instance in context:
if instance.data['family'] == "workfile":
instance.data["version"] = context.data["version"]

# Apply each user defined attribute as data
for attr in cmds.listAttr(layer, userDefined=True) or list():
try:
Expand Down
61 changes: 34 additions & 27 deletions pype/plugins/maya/publish/collect_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,38 @@ def process(self, instance):
i = 0
for inst in instance.context:

self.log.debug('processing {}'.format(inst))
self.log.debug('processing2 {}'.format(instance.context[i]))
self.log.debug('filtering {}'.format(inst))
data = instance.context[i].data

if inst.name == reviewable_subset[0]:
if data.get('families'):
data['families'].append('review')
else:
data['families'] = ['review']
self.log.debug('adding review family to {}'.format(reviewable_subset))
data['review_camera'] = camera
# data["publish"] = False
data['frameStartFtrack'] = instance.data["frameStartHandle"]
data['frameEndFtrack'] = instance.data["frameEndHandle"]
data['frameStartHandle'] = instance.data["frameStartHandle"]
data['frameEndHandle'] = instance.data["frameEndHandle"]
data["frameStart"] = instance.data["frameStart"]
data["frameEnd"] = instance.data["frameEnd"]
data['handles'] = instance.data.get('handles', None)
data['step'] = instance.data['step']
data['fps'] = instance.data['fps']
data["isolate"] = instance.data["isolate"]
cmds.setAttr(str(instance) + '.active', 1)
self.log.debug('data {}'.format(instance.context[i].data))
instance.context[i].data.update(data)
instance.data['remove'] = True
i += 1
if inst.name != reviewable_subset[0]:
self.log.debug('subset name does not match {}'.format(
reviewable_subset[0]))
i += 1
continue

if data.get('families'):
data['families'].append('review')
else:
data['families'] = ['review']
self.log.debug('adding review family to {}'.format(
reviewable_subset))
data['review_camera'] = camera
# data["publish"] = False
data['frameStartFtrack'] = instance.data["frameStartHandle"]
data['frameEndFtrack'] = instance.data["frameEndHandle"]
data['frameStartHandle'] = instance.data["frameStartHandle"]
data['frameEndHandle'] = instance.data["frameEndHandle"]
data["frameStart"] = instance.data["frameStart"]
data["frameEnd"] = instance.data["frameEnd"]
data['handles'] = instance.data.get('handles', None)
data['step'] = instance.data['step']
data['fps'] = instance.data['fps']
data["isolate"] = instance.data["isolate"]
cmds.setAttr(str(instance) + '.active', 1)
self.log.debug('data {}'.format(instance.context[i].data))
instance.context[i].data.update(data)
instance.data['remove'] = True
self.log.debug('isntance data {}'.format(instance.data))
else:
if self.legacy:
instance.data['subset'] = task + 'Review'
Expand All @@ -82,8 +87,10 @@ def process(self, instance):
instance.data['subset'] = subset

instance.data['review_camera'] = camera
instance.data['frameStartFtrack'] = instance.data["frameStartHandle"]
instance.data['frameEndFtrack'] = instance.data["frameEndHandle"]
instance.data['frameStartFtrack'] = \
instance.data["frameStartHandle"]
instance.data['frameEndFtrack'] = \
instance.data["frameEndHandle"]

# make ftrack publishable
instance.data["families"] = ['ftrack']
Expand Down
16 changes: 13 additions & 3 deletions pype/plugins/maya/publish/extract_camera_alembic.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ def process(self, instance):
# get settings
framerange = [instance.data.get("frameStart", 1),
instance.data.get("frameEnd", 1)]
handles = instance.data.get("handles", 0)
handle_start = instance.data.get("handleStart", 0)
handle_end = instance.data.get("handleEnd", 0)

# TODO: deprecated attribute "handles"

if handle_start is None:
handle_start = instance.data.get("handles", 0)
handle_end = instance.data.get("handles", 0)

step = instance.data.get("step", 1.0)
bake_to_worldspace = instance.data("bakeToWorldSpace", True)

Expand Down Expand Up @@ -55,8 +63,10 @@ def process(self, instance):

job_str = ' -selection -dataFormat "ogawa" '
job_str += ' -attrPrefix cb'
job_str += ' -frameRange {0} {1} '.format(framerange[0] - handles,
framerange[1] + handles)
job_str += ' -frameRange {0} {1} '.format(framerange[0]
- handle_start,
framerange[1]
+ handle_end)
job_str += ' -step {0} '.format(step)

if bake_to_worldspace:
Expand Down
16 changes: 12 additions & 4 deletions pype/plugins/maya/publish/extract_camera_mayaScene.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,18 @@ def process(self, instance):

framerange = [instance.data.get("frameStart", 1),
instance.data.get("frameEnd", 1)]
handles = instance.data.get("handles", 0)
handle_start = instance.data.get("handleStart", 0)
handle_end = instance.data.get("handleEnd", 0)

# TODO: deprecated attribute "handles"

if handle_start is None:
handle_start = instance.data.get("handles", 0)
handle_end = instance.data.get("handles", 0)

range_with_handles = [framerange[0] - handle_start,
framerange[1] + handle_end]

step = instance.data.get("step", 1.0)
bake_to_worldspace = instance.data("bakeToWorldSpace", True)

Expand All @@ -121,9 +132,6 @@ def process(self, instance):
cameras = cmds.ls(members, leaf=True, shapes=True, long=True,
dag=True, type="camera")

range_with_handles = [framerange[0] - handles,
framerange[1] + handles]

# validate required settings
assert len(cameras) == 1, "Single camera must be found in extraction"
assert isinstance(step, float), "Step must be a float value"
Expand Down
15 changes: 8 additions & 7 deletions pype/plugins/nuke/load/load_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def preserve_trim(node):
"{}".format(script_start))


def loader_shift(node, frame, relative=True):
def loader_shift(node, frame, relative=False):
"""Shift global in time by i preserving duration
This moves the loader by i frames preserving global duration. When relative
Expand All @@ -61,22 +61,23 @@ def loader_shift(node, frame, relative=True):
script_start = nuke.root()["first_frame"].value()

if relative:
node['frame_mode'].setValue("start at")
node['frame'].setValue(str(script_start))
else:
node['frame_mode'].setValue("start at")
node['frame'].setValue(str(frame))

return int(script_start)


class LoadSequence(api.Loader):
"""Load image sequence into Nuke"""

families = ["render2d", "source", "plate", "render", "prerender", "review"]
representations = ["exr", "dpx", "jpg", "jpeg", "png"]

label = "Load sequence"
order = -10
icon = "code-fork"
color = "orange"
label = "Load Image Sequence"
order = -20
icon = "file-video-o"
color = "white"

def load(self, context, name, namespace, data):
from avalon.nuke import (
Expand Down
2 changes: 1 addition & 1 deletion pype/plugins/photoshop/load/load_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ImageLoader(api.Loader):
Stores the imported asset in a container named after the asset.
"""

families = ["image"]
families = ["image", "render"]
representations = ["*"]

def load(self, context, name=None, namespace=None, data=None):
Expand Down
2 changes: 1 addition & 1 deletion pype/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.13.5"
__version__ = "2.13.6"

0 comments on commit ca251a8

Please sign in to comment.