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 #2952 from pypeclub/OP-2832_Option-on-object-set-t…
Browse files Browse the repository at this point in the history
…o-choose-transparency-algorithm

Maya - added transparency into review creator
  • Loading branch information
kalisp authored Mar 28, 2022
2 parents 3d7c57f + a029e55 commit 2c427a1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions openpype/hosts/maya/plugins/create/create_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ class CreateReview(plugin.Creator):
keepImages = False
isolate = False
imagePlane = True
transparency = [
"preset",
"simple",
"object sorting",
"weighted average",
"depth peeling",
"alpha cut"
]

def __init__(self, *args, **kwargs):
super(CreateReview, self).__init__(*args, **kwargs)
Expand All @@ -28,5 +36,6 @@ def __init__(self, *args, **kwargs):
data["isolate"] = self.isolate
data["keepImages"] = self.keepImages
data["imagePlane"] = self.imagePlane
data["transparency"] = self.transparency

self.data = data
5 changes: 5 additions & 0 deletions openpype/hosts/maya/plugins/publish/extract_playblast.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ def process(self, instance):
pm.currentTime(refreshFrameInt - 1, edit=True)
pm.currentTime(refreshFrameInt, edit=True)

# Override transparency if requested.
transparency = instance.data.get("transparency", 0)
if transparency != 0:
preset["viewport2_options"]["transparencyAlgorithm"] = transparency

# Isolate view is requested by having objects in the set besides a
# camera.
if preset.pop("isolate_view", False) and instance.data.get("isolate"):
Expand Down

0 comments on commit 2c427a1

Please sign in to comment.