fps and style issues

This commit is contained in:
Ondrej Samohel 2020-10-06 16:27:19 +02:00
parent d0b6b6526c
commit 437147d865
No known key found for this signature in database
GPG key ID: 8A29C663C672C2B7
5 changed files with 16 additions and 5 deletions

View file

@ -50,4 +50,4 @@ class CollectScene(pyblish.api.ContextPlugin):
{"function": "node.subNodes", "args": ["Top"]}
)["result"]
context.data["all_nodes"] = all_nodes
context.data["allNodes"] = all_nodes

View file

@ -30,7 +30,7 @@ class ExtractTemplate(pype.api.Extractor):
unique_backdrops = [backdrops[x] for x in set(backdrops.keys())]
# Get non-connected nodes within backdrops.
all_nodes = instance.context.data.get("all_nodes")
all_nodes = instance.context.data.get("allNodes")
for node in [x for x in all_nodes if x not in dependencies]:
within_unique_backdrops = bool(
[x for x in self.get_backdrops(node) if x in unique_backdrops]

View file

@ -22,7 +22,7 @@ class ExtractWorkfile(pype.api.Extractor):
backdrops = harmony.send(
{"function": "Backdrop.backdrops", "args": ["Top"]}
)["result"]
nodes = instance.context.data.get("all_nodes")
nodes = instance.context.data.get("allNodes")
staging_dir = self.staging_dir(instance)
filepath = os.path.join(staging_dir, "{}.tpl".format(instance.name))

View file

@ -8,7 +8,11 @@ import pype.hosts.harmony
class ValidateAudio(pyblish.api.InstancePlugin):
"""Ensures that there is an audio file in the scene. If you are sure that you want to send render without audio, you can disable this validator before clicking on "publish" """
"""Ensures that there is an audio file in the scene.
If you are sure that you want to send render without audio, you can
disable this validator before clicking on "publish"
"""
order = pyblish.api.ValidatorOrder
label = "Validate Audio"

View file

@ -58,8 +58,15 @@ class ValidateSceneSettings(pyblish.api.InstancePlugin):
for string in self.frame_check_filter):
expected_settings.pop("frameEnd")
# handle case where ftrack uses only two decimal places
# 23.976023976023978 vs. 23.98
fps = instance.context.data.get("frameRate")
if isinstance(instance.context.data.get("frameRate"), float):
fps = float(
"{:.2f}".format(instance.context.data.get("frameRate")))
current_settings = {
"fps": instance.context.data.get("frameRate"),
"fps": fps,
"frameStart": instance.context.data.get("frameStart"),
"frameEnd": instance.context.data.get("frameEnd"),
"resolutionWidth": instance.context.data.get("resolutionWidth"),