Merge pull request #840 from tokejepsen/2.x/feature/maya_playblast_image_plane

Optionally hide image planes from reviews.
This commit is contained in:
Milan Kolar 2020-12-21 09:16:35 +01:00 committed by GitHub
commit a4b2556538
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -13,6 +13,7 @@ class CreateReview(avalon.maya.Creator):
defaults = ['Main']
keepImages = False
isolate = False
imagePlane = True
def __init__(self, *args, **kwargs):
super(CreateReview, self).__init__(*args, **kwargs)
@ -25,5 +26,6 @@ class CreateReview(avalon.maya.Creator):
data["isolate"] = self.isolate
data["keepImages"] = self.keepImages
data["imagePlane"] = self.imagePlane
self.data = data

View file

@ -81,6 +81,13 @@ class ExtractPlayblast(pype.api.Extractor):
if instance.data.get("isolate"):
preset["isolate"] = instance.data["setMembers"]
# Show/Hide image planes on request.
image_plane = instance.data.get("imagePlane", True)
if "viewport_options" in preset:
preset["viewport_options"]["imagePlane"] = image_plane
else:
preset["viewport_options"] = {"imagePlane": image_plane}
with maintained_time():
filename = preset.get("filename", "%TEMP%")