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

Maya: Fix extract review and thumbnail for Maya 2020 #4744

Merged
merged 9 commits into from
Apr 3, 2023

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Mar 29, 2023

Changelog Description

Fix playblasting in Maya 2020 with override viewport options enabled. Fixes #4730.

Additional info

More info see issue #4730

I chose to adjust vendorized capture.py instead of editing both of maya's ExtractPlayblast and ExtractThumbnail plug-ins because I noticed it was already changed locally from the actual upstream capture.py - the Py3/2 compatibility was added differently upstream in the original capture.py repository. By doing this it also resolves issues with other usages of capture that maybe a studio had implemented.

Testing notes:

  1. Have override viewport options enabled in project settings (default)
  2. Start Maya 2020
  3. Publish review + thumbnail

Both should work fine.

@ynbot ynbot added size/XS Denotes a PR changes 0-99 lines, ignoring general files and removed host: Maya labels Mar 29, 2023
@ynbot ynbot removed the host: Maya label Mar 30, 2023
@ynbot ynbot removed the host: Maya label Mar 30, 2023
@iLLiCiTiT iLLiCiTiT assigned tokejepsen and unassigned LiborBatek Mar 30, 2023
Copy link
Member

@tokejepsen tokejepsen left a comment

Choose a reason for hiding this comment

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

Didnt get a failed extraction in develop but got the error message.

With this PR I can still publish successfully, but getting this error message instead;


Instance: 
reviewMain
Message: 
Cannot apply options Invalid flag 'gpuCacheDisplayFilter'
Plugin: 
pyblish.ExtractPlayblast
Path: 
C:\Users\tokejepsen\OpenPype\openpype\vendor\python\common\capture.py
Line: 
756
Level: 
ERROR
Thread: 
MainThread
Millis: 
59.0000152588

@tokejepsen tokejepsen assigned BigRoy and unassigned tokejepsen Mar 30, 2023
@BigRoy
Copy link
Collaborator Author

BigRoy commented Mar 30, 2023

@tokejepsen Just wondering - did you have the gpuCache plug-in enabled or disabled? :) If disabled, could you try again with it enabled?

I'm pretty sure the issue is there. I feel this is rather a design issue with capture. You can't really know with the flat dict which flags are supposed to be plugin object flags. And if the plug-in isn't loaded you don't know that that string flag might belong to a plug-in object so you can't assign it correctly.

I feel we should patch up capture.py here so that it actually explicitly needs to the plug-in filters in viewport_options['pluginObjects']. That way we can actively filter it out if the pluginObject is not defined in maya instead of passing the wrong flag.

The other way would be to capture any errors on flags passed to the modelEditor command but I feel that's just hiding bad design.

I'll refactor it within a day to patch this up. I'll however need to move the gpuCacheDisplayFilter in settings too. 👍

@tokejepsen
Copy link
Member

@tokejepsen Just wondering - did you have the gpuCache plug-in enabled or disabled? :) If disabled, could you try again with it enabled?

Yeah, the plugin was disabled. Enabling it and we get no errors :)

This way we can pass e.g. `gpuCacheDisplayFilter` value preset setting for a plug-in even when it might not exist as an argument.
@BigRoy
Copy link
Collaborator Author

BigRoy commented Mar 30, 2023

Try again @tokejepsen I've tested here in Maya 2020 + 2023 with gpuCache enabled and disabled, etc. and now it seems fine. This change in settings now also allows to customize and add other plug-in display filters on might have.

@BigRoy BigRoy requested a review from tokejepsen March 30, 2023 20:35
@BigRoy BigRoy requested a review from tokejepsen March 31, 2023 10:46
@BigRoy BigRoy assigned tokejepsen and unassigned BigRoy Mar 31, 2023
Copy link
Member

@tokejepsen tokejepsen left a comment

Choose a reason for hiding this comment

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

Works well in Maya 2023 and 2020.

@tokejepsen tokejepsen assigned antirotor and unassigned tokejepsen Mar 31, 2023
@mkolar mkolar merged commit fc5f8ce into ynput:develop Apr 3, 2023
@ynbot ynbot added this to the next-patch milestone Apr 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community contribution host: Maya size/XS Denotes a PR changes 0-99 lines, ignoring general files type: bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Maya: Extract Playblast in 2020.
7 participants