OpenPype
OpenPype copied to clipboard
Maya: extract Thumbnail "No active model panel found"
Describe the bug
switching override_viewport_options
off in project_settings/maya/publish/ExtractPlayblast/capture_preset/Viewport Options/override_viewport_options
is crashing Thumbnail extract during review publish
b'Processing Thumbnail'
// pyblish.ExtractThumbnail : Extracting capture.. //
// pyblish.ExtractThumbnail : Using viewport preset: {'compression': 'jpg', 'format': 'image', 'quality': 95, 'isolate_view': False, 'off_screen': True, 'height': 1080, 'width': 1920, 'display_options': {'background': [0.49019607843137253, 0.49019607843137253, 0.49019607843137253], 'backgroundBottom': [0.49019607843137253, 0.49019607843137253, 0.49019607843137253], 'backgroundTop': [0.49019607843137253, 0.49019607843137253, 0.49019607843137253], 'displayGradient': True}, 'viewport_options': {'rendererName': 'vp2Renderer', 'displayLights': 'default', 'shadows': True, 'textures': True, 'twoSidedLighting': True, 'fogging': False, 'cameras': False, 'clipGhosts': False, 'controlVertices': False, 'deformers': False, 'dimensions': False, 'dynamicConstraints': False, 'dynamics': False, 'fluids': False, 'follicles': False, 'greasePencils': False, 'grid': False, 'hairSystems': True, 'handles': False, 'hud': True, 'hulls': False, 'ikHandles': False, 'imagePlane': True, 'joints': False, 'lights': False, 'locators': False, 'manipulators': False, 'motionTrails': False, 'nCloths': False, 'nParticles': False, 'nRigids': False, 'nurbsCurves': False, 'nurbsSurfaces': False, 'particleInstancers': False, 'pivots': False, 'planes': False, 'pluginShapes': False, 'polymeshes': True, 'strokes': False, 'subdivSurfaces': False}, 'viewport2_options': {'textureMaxResolution': 1024, 'enableTextureMaxRes': True, 'textureMaxResMode': 1, 'renderDepthOfField': True, 'lineAAEnable': True, 'multiSampleEnable': True, 'multiSampleCount': 8, 'ssaoEnable': False, 'ssaoAmount': 1, 'ssaoRadius': 16, 'ssaoFilterRadius': 16, 'ssaoSamples': 16, 'hwFogFalloff': 0, 'hwFogDensity': 0.0, 'hwFogStart': 0, 'hwFogEnd': 100, 'hwFogAlpha': 0, 'hwFogColorR': 1.0, 'hwFogColorG': 1.0, 'hwFogColorB': 1.0, 'motionBlurEnable': False, 'motionBlurSampleCount': 8, 'motionBlurShutterOpenFraction': 0.2}, 'sound': None} //
// pyblish.ExtractThumbnail : Outputting images to C:\Users\murph\AppData\Local\Temp\pyblish_tmp_yx_vbzwc\reviewMain //
// Error: pyblish.plugin : Traceback (most recent call last):
File "D:\REPO\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "D:\REPO\OpenPype\openpype\hosts\maya\plugins\publish\extract_thumbnail.py", line 121, in process
File "D:\REPO\OpenPype\openpype\vendor\python\common\capture.py", line 446, in parse_active_view
panel = parse_active_panel()
File "D:\REPO\OpenPype\openpype\vendor\python\common\capture.py", line 439, in parse_active_panel
raise RuntimeError("No active model panel found")
RuntimeError: No active model panel found
Traceback (most recent call last):
File "D:\REPO\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "<string>", line 121, in process
File "D:\REPO\OpenPype\openpype\vendor\python\common\capture.py", line 446, in parse_active_view
panel = parse_active_panel()
File "D:\REPO\OpenPype\openpype\vendor\python\common\capture.py", line 439, in parse_active_panel
raise RuntimeError("No active model panel found")
RuntimeError: No active model panel found //
b'Processing Extract Review'
[cuID:OP-3849]
so the issue is not connected to override_viewport_options
but to #3753 and #3384 probably
The issue is definitely with that toggle - I don't see anything in the other PRs that might cause this. There will be cases where Maya won't be able to find an active model editor panel, and thus capture.parse_active_panel
would fail.
It could be the case that this only happens if you're doing multiple captures after each other as mentioned here. If this is the case then a Collector could be implemented that does "Collect Active Panel" which is the panel then used in all playblast-like extractors if needed.
Edit: This PR #3566 does seem it tried to alleviate something like that.
Instead of using the getPanel(withFocus=True)
you could try maya.cmds.playblast(activeEditor=True)
or something. I've seen that being much more reliable, but even then... a panel might not exist. In the worst-case scenario maybe a fallback to default settings with a Warning that panel could not be found or something alike would be the best way without interfering with the users workflow.
this is not a case of multiple review instances.
It will create a playblast successfully but fail on thumbnail extract
I feel like disabling that Setting actually does more unexpected things and the big is sligthly bigger - see my comment here
Copied relevant part:
Warning
Also it's good to be aware that disabling
override_viewport_options
actually ALSO disabled the camera options and display options overrides since those are also captured and updated into the preset.Looking at the logic I think that would even override the actual
camera
too! I feel there's a much bigger bug there.
@m-u-r-p-h-y could you confirm that issue is actually present? :) If so, I'd be happy to look into fixing it.