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 #425 from tokejepsen/2.x/feature/maya_isolate_view
Browse files Browse the repository at this point in the history
Isolate view on instance members.
  • Loading branch information
mkolar authored Aug 21, 2020
2 parents cefcfe1 + ce4466b commit e42264c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pype/plugins/maya/create/create_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class CreateReview(avalon.maya.Creator):
icon = "video-camera"
defaults = ['Main']
keepImages = False
isolate = False

def __init__(self, *args, **kwargs):
super(CreateReview, self).__init__(*args, **kwargs)
Expand All @@ -22,6 +23,7 @@ def __init__(self, *args, **kwargs):
for key, value in animation_data.items():
data[key] = value

data["isolate"] = self.isolate
data["keepImages"] = self.keepImages

self.data = data
1 change: 1 addition & 0 deletions pype/plugins/maya/publish/collect_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def process(self, instance):
data['handles'] = instance.data.get('handles', None)
data['step'] = instance.data['step']
data['fps'] = instance.data['fps']
data["isolate"] = instance.data["isolate"]
cmds.setAttr(str(instance) + '.active', 1)
self.log.debug('data {}'.format(instance.context[i].data))
instance.context[i].data.update(data)
Expand Down
5 changes: 5 additions & 0 deletions pype/plugins/maya/publish/extract_playblast.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def process(self, instance):
pm.currentTime(refreshFrameInt - 1, edit=True)
pm.currentTime(refreshFrameInt, edit=True)

# Isolate view is requested by having objects in the set besides a
# camera.
if instance.data.get("isolate"):
preset["isolate"] = instance.data["setMembers"]

with maintained_time():
filename = preset.get("filename", "%TEMP%")

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

# Isolate view is requested by having objects in the set besides a
# camera.
if instance.data.get("isolate"):
preset["isolate"] = instance.data["setMembers"]

with maintained_time():
filename = preset.get("filename", "%TEMP%")

Expand Down

0 comments on commit e42264c

Please sign in to comment.