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

Maya: Camera name can be added to burnins. #674

Merged
merged 3 commits into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pype/plugins/global/publish/extract_burnin.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ def main_process(self, instance):
filled_anatomy = anatomy.format_all(burnin_data)
burnin_data["anatomy"] = filled_anatomy.get_solved()

# Add source camera name to burnin data
camera_name = repre.get("camera_name")
if camera_name:
burnin_data["camera_name"] = camera_name

first_output = True

files_to_delete = []
Expand Down
6 changes: 5 additions & 1 deletion pype/plugins/maya/publish/extract_playblast.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ def process(self, instance):
if not instance.data.get("keepImages"):
tags.append("delete")

# Add camera node name to representation data
camera_node_name = pm.ls(camera)[0].nodeName()
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if this is right way how to get the name.
Also not sure if this is right plugin to do this, was thinking that this may be done in Collect Review Data where camera is collected to instance data.

Copy link
Member

Choose a reason for hiding this comment

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

you actually don't have to do this at all. camera name is already collected in the instance. you just need to grab it and use it.

Copy link
Member Author

Choose a reason for hiding this comment

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

you just need to grab it and use it.

Do it, please :)


representation = {
'name': 'png',
'ext': 'png',
Expand All @@ -119,7 +122,8 @@ def process(self, instance):
"frameEnd": end,
'fps': fps,
'preview': True,
'tags': tags
'tags': tags,
'camera_name': camera_node_name
}
instance.data["representations"].append(representation)

Expand Down