So I found a post on a forum regarding PySide and Maya on Linux having a similar issue. What the guy noticed is that as of Nuke6.3, PySide is packaged with it. He found that copying the structure into Maya allowed him to import PySide.
So off I went to the Nuke site and downloaded Nuke6.3 PLE. I did the following in Maya’s script editor:
import site
site.addsitedir(r’C:/Program Files/Nuke6.3v6/plugins’)
from PySide import QtCore
And it works.
Their PySide directory structure is totally different from the vanilla installed PySide.
Here’s what I found out. When I stated before that I had tried previous versions of PySide, I had tried PySide1.0.9 and 1.0.7. Both gave the same error on import.
I noticed that Nuke6.3 is using PySide 1.0.3. So I downloaded that one and tried it inside Maya - what do you know - it worked.
The binary files available on the Pyside site started compiling against Qt4.7.4 from PySide1.0.6 onwards. Previously, they compiled against Qt4.7.3 - the ones that work with Maya.
I didn’t think minor releases of Qt mattered that much. Looks like it does and it would be helpful if someone who has more knowledge in this area would explain why.
PySide 1.0.6 has builds for both Qt4.7.3 and 4.7.4 available and unless you want to build the latest PySide yourself, that would be the last compatible version for Maya2012.
quick question, you’re saying Maya works with QT uptil 4.7.3 and not 4.7.4, but 2012 ships with Qt 4.7.1 right?
Would it be best to use a PySide compiled against Qt 4.7.1 then? Or are we safe using 4.7.3 builds?
[QUOTE=dgovil;13410]quick question, you’re saying Maya works with QT uptil 4.7.3 and not 4.7.4, but 2012 ships with Qt 4.7.1 right?
Would it be best to use a PySide compiled against Qt 4.7.1 then? Or are we safe using 4.7.3 builds?[/QUOTE]
I was just able to successfully import PySide at all. Lots of due dilligence testing first before I would go on record and recommend anything. Like I said in my earlier post - I didn’t think minor releases were any big deal. I’m trying to track down what, if anything, is majorly different between 4.7.3 and 4.7.4.
[QUOTE=cgjedi;13738]I don’t believe that is related to this issue. That bug was from April 2011 and I’m trying out versions from the last couple of months of 2011.[/QUOTE]
Ah yes you are right, I didn’t read the date, sorry about that.
4.7.4 is likely the main problem. In my testing 4.7.3 is the latest that appears to work as Maya 2011/2012 uses 4.7.1 QT. 4.7.4 typically results in a bunch of rather unhelpful errors when you try to import the Qt modules.
I’ve got 1.0.3 compiled against 4.7.3 at home that appears to be working and I’m trying to get that updated to 1.1.0 with 4.7.3 as well so I’ll post back if I’ve got something working.
I spent some time compiling all the various version of Qt and then compiling them against the various PySide versions and testing within Maya. Very interesting stuff. Someone should put up a chart…