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

Commit

Permalink
Merge pull request #8 from pypeclub/bugfix/nks-resolution-data-missco…
Browse files Browse the repository at this point in the history
…llected

nks collecting fps and resolution data to anatomy
  • Loading branch information
jakubjezek001 authored Mar 5, 2020
2 parents 083d184 + eb26173 commit 65b6e4d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
6 changes: 5 additions & 1 deletion pype/plugins/global/publish/collect_instance_anatomy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,13 @@ def process(self, instance):
if resolution_height:
anatomy_data["resolution_height"] = resolution_height

pixel_aspect = instance.data.get("pixelAspect")
if pixel_aspect:
anatomy_data["pixel_aspect"] = float("{:0.2f}".format(pixel_aspect))

fps = instance.data.get("fps")
if resolution_height:
anatomy_data["fps"] = fps
anatomy_data["fps"] = float("{:0.2f}".format(fps))

instance.data["projectEntity"] = project_entity
instance.data["assetEntity"] = asset_entity
Expand Down
17 changes: 11 additions & 6 deletions pype/plugins/nukestudio/publish/collect_hierarchy_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def process(self, context):
width = int(sequence.format().width())
height = int(sequence.format().height())
pixel_aspect = sequence.format().pixelAspect()
fps = context.data["fps"]

# build data for inner nukestudio project property
data = {
Expand Down Expand Up @@ -161,9 +162,10 @@ def process(self, context):
"asset": asset,
"hierarchy": hierarchy,
"parents": parents,
"width": width,
"height": height,
"resolutionWidth": width,
"resolutionHeight": height,
"pixelAspect": pixel_aspect,
"fps": fps,
"tasks": instance.data["tasks"]
})

Expand Down Expand Up @@ -223,9 +225,12 @@ def process(self, context):
instance.data["parents"] = s_asset_data["parents"]
instance.data["hierarchy"] = s_asset_data["hierarchy"]
instance.data["tasks"] = s_asset_data["tasks"]
instance.data["width"] = s_asset_data["width"]
instance.data["height"] = s_asset_data["height"]
instance.data["resolutionWidth"] = s_asset_data[
"resolutionWidth"]
instance.data["resolutionHeight"] = s_asset_data[
"resolutionHeight"]
instance.data["pixelAspect"] = s_asset_data["pixelAspect"]
instance.data["fps"] = s_asset_data["fps"]

# adding frame start if any on instance
start_frame = s_asset_data.get("startingFrame")
Expand Down Expand Up @@ -275,8 +280,8 @@ def process(self, context):
# adding SourceResolution if Tag was present
if instance.data.get("main"):
in_info['custom_attributes'].update({
"resolutionWidth": instance.data["width"],
"resolutionHeight": instance.data["height"],
"resolutionWidth": instance.data["resolutionWidth"],
"resolutionHeight": instance.data["resolutionHeight"],
"pixelAspect": instance.data["pixelAspect"]
})

Expand Down
4 changes: 2 additions & 2 deletions pype/plugins/nukestudio/publish/collect_plates.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def process(self, instance):
class CollectPlatesData(api.InstancePlugin):
"""Collect plates"""

order = api.CollectorOrder + 0.495
order = api.CollectorOrder + 0.48
label = "Collect Plates Data"
hosts = ["nukestudio"]
families = ["plate"]
Expand Down Expand Up @@ -126,7 +126,7 @@ def process(self, instance):
transfer_data = [
"handleStart", "handleEnd", "sourceIn", "sourceOut", "frameStart",
"frameEnd", "sourceInH", "sourceOutH", "clipIn", "clipOut",
"clipInH", "clipOutH", "asset", "track", "version", "width", "height", "pixelAspect"
"clipInH", "clipOutH", "asset", "track", "version", "resolutionWidth", "resolutionHeight", "pixelAspect", "fps"
]

# pass data to version
Expand Down

4 comments on commit 65b6e4d

@mkolar
Copy link
Member

@mkolar mkolar commented on 65b6e4d Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge pull request backlog from pypeclub/bugfix/nks-resolution-data-misscollected

nks collecting fps and resolution data to anatomy
via Quire

@mkolar
Copy link
Member

@mkolar mkolar commented on 65b6e4d Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge pull request backlog from pypeclub/bugfix/nks-resolution-data-misscollected

nks collecting fps and resolution data to anatomy
via Quire

@mkolar
Copy link
Member

@mkolar mkolar commented on 65b6e4d Mar 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge pull request backlog from pypeclub/bugfix/nks-resolution-data-misscollected

nks collecting fps and resolution data to anatomy
via Quire

@mkolar
Copy link
Member

@mkolar mkolar commented on 65b6e4d Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge pull request backlog from pypeclub/bugfix/nks-resolution-data-misscollected

nks collecting fps and resolution data to anatomy
via Quire

Please sign in to comment.