PySide and Maya2012

hey,
just wanted to ask wether theres been any successful attempt to use pySide in Maya 2012 - Id really like to try it since I am thinking of using it as it ships with Nuke nowadays.

PySide works fine with maya, however I cannot for the life of me find a way to import shiboken. The wrapinstance method is on that module and thats what you need to attach windows to maya.

What am I missing?
Is this included in the binaries for windows or is there an external build?

Thanks

[QUOTE=TheMaxx;16443]PySide works fine with maya,
[/QUOTE]

Thanks for the answer, guess I have to try this at some point.

I tired getting nuke and copying the libs and I couldn’t get it to work still. maybe @TheMaxx would be kind enough as to share what method he used to make the thing work?

i’m just using the example from nathan horne’s site to test imports:

<code>
from PySide import QtGui, QtCore
btn = QtGui.QPushButton(QtGui.file,)
btn.show()
</code>

That works as expected. I had to grab the right version of pyside though, as the recent ones are compiled against qt 4.7.4 and I believe the latest maya will work with is 4.7.3. So i went to http://www.pyside.org/files/ and grabbed the latest 4.7.3 version for py 2.6 and win64, http://www.pyside.org/files/PySide-1.0.6qt473.win32-py2.6.exe. Once installed you can move the folder from site-packages to wherever you wish and do the sites.addsitedir() in your script before importing PySide.

If you need stuff our of qt 4.7.4+ or the most recent PySide stuff, you’d probably need to compile pyside against qt 4.7.3.

hmmm, now that i am typing this up, this probably answers my own question about shiboken :slight_smile: It’s probably in the latest pyside.

Is anyone able to compile this correctly? Any tricks we should know about?

ok so after a morning of tinkering I got pyside 1.1.1 comiled against maya’s qt. I found this at the end of my adventure when there was a compile error:

http://renderloop.blogspot.com/2012/05/building-pyside-for-maya-2012-on.html

Anyhow, I did it the hard way, but following these steps should get you a solid build of PySide. Im not sure if shiboken will be distrubuted, if not you can just get it from the /build/ dir. Look for shiboken.pyd and copy that into your site-packages or wherever youre distributing from.

One thing to note is when you use shiboken for wrapInstance on the maya window, change the object type to QtGui.QWidget instead of QtCore.QObject.

Thanks TheMaxx, I’m gonna give it another shot

I discovered that foundry did not provided PySide with Nuke 6.3v4x64 but this post on CGTalk referred to Nuke 6.3v5 so I guess PySide will be included with versions Nuke 6.3v5 x64upwards…

I am downloading Nuke 7 x64 15 day trial guessing it might include Pyside package that I can use with Maya 2012x64. so my question isit a working solution, since its 400mb download it will take time to finish or if anyone know is it included in the trial pack ?

or can you link me up if someone has build PySide for Maya 2012 on Ubuntu ?

the link in my previous post links to the binaries for maya 2012x64 i believe

for Ubuntu ?