Maya2017 PySide2 Multimedia missing

Maya2017 PySide2 Multimedia missing

Anonymous
Not applicable
1,634 Views
10 Replies
Message 1 of 11

Maya2017 PySide2 Multimedia missing

Anonymous
Not applicable

I am trying to update my plugins for Maya2017.  I am surprised to discover that the library "Multimedia" is missing from the included build of PySide2.  It has been included in all the Maya releases even up to 2016.5.  Why is it no longer there?  Is this an oversight?

1,635 Views
10 Replies
Replies (10)
Message 2 of 11

Anonymous
Not applicable

Is there any hope that someone from Autodesk is reading these forums and will reply?  If not, where should questions like this be posted?

0 Likes
Message 3 of 11

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

I've checked the cmakelist of PySide2 and I found comments below.

 

if(0)
    ### crashes shiboken, as soon as 'QAbstractVideoBuffer' is touched!
    HAS_QT_MODULE(Qt5Multimedia_FOUND QtMultimedia)
else()
    set(DISABLE_QtMultimedia 1 PARENT_SCOPE)
endif()

It seems that QtMultimedia is disabled due to an issue. You can try to uncomment it then build the PySide2 with VS2012 , Qt5.6.1 and Maya python and try to replace the PySide2 shipped with Maya 2017 with files inside pyside_install. There is no guarantee it will work properly. Please backup the original files before replacing the files.

 

Yours,

Li

0 Likes
Message 4 of 11

Anonymous
Not applicable

Thanks for looking into that.  This is a disappointing situation since this means Maya2017 has shipped with a faulty PySide build.  It is not reasonable to expect end users to debug and recompile PySide in order to use my app.  I hope this is a known issue and is being addressed for the next fix release.

Message 5 of 11

Anonymous
Not applicable

Hello Autodesk, could you please verify that this PySide issue has been put on a ticket to fix for the next update release.

Message 6 of 11

Zhihao.Li
Alumni
Alumni

Hey,

We're addressing this one (tracked by MAYA-74109). Meanwhile, it's also logged at Qt company. The good news is that it's resolved recently.

https://bugreports.qt.io/browse/PYSIDE-349

 

 

Cheers,
Zhihao

Message 7 of 11

Anonymous
Not applicable

QtMultimedia still not working in maya 2018

if you import it using

from PySide2 import QtMultmedia

 

you get the error below

 

// Error: ImportError: file <maya console> line 1: cannot import name QtMultmedia //

 

 

that means it is still not fixed since the past 2 years...would be nice if autodesk had someone aware of this issue.


@Zhihao.Li wrote:

Hey,

We're addressing this one (tracked by MAYA-74109). Meanwhile, it's also logged at Qt company. The good news is that it's resolved recently.

https://bugreports.qt.io/browse/PYSIDE-349

 

 

Cheers,
Zhihao


 

0 Likes
Message 8 of 11

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

I just tested with Maya 2018.6, it seems working fine

 

 

import PySide2.QtMultimedia as qm

print dir(qm)


['QAbstractAudioDeviceInfo', 'QAbstractAudioInput', 'QAbstractAudioOutput', 'QAbstractVideoBuffer', 'QAbstractVideoSurface', 'QAudio', 'QAudioDeviceInfo', 'QAudioFormat', 'QAudioInput', 'QAudioOutput', 'QVideoFrame', 'QVideoSurfaceFormat', '__doc__', '__file__', '__name__', '__package__']

Yours,

Li

 

0 Likes
Message 9 of 11

Anonymous
Not applicable

Hi , thank you for your quick response.  yes , it seems fine when you import the module only 

but when you import sound from that module it gives an error

 

from PySide2.QtMultimedia import QSound

 

does the above line work fine for you ? 

 

Message 10 of 11

cheng_xi_li
Autodesk Support
Autodesk Support
No, it doesn't work for me neither.
It appears that the PySide2 shipped with Maya 2018/2019 wasn't the latest one. PySide2 was in alpha when shipped with Maya 2017 and there are some modules missing. They might have added QSound in PySide2.QtMultimedia after Maya 2018/2019 released. If you wanted to use it right now, I am afraid you'll need build PySide2 yourself and replace the one shipped with Maya.
I noticed that Qt Company suggests that the latest Qt for Python 5.12 is tightly bound to a certain version of Qt. I am not sure if it could be used with Maya 2018/2019(Qt 5.6).

Yours,
Li
0 Likes
Message 11 of 11

zapan669
Contributor
Contributor

Fixed at least in Maya 2022

0 Likes