Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / [SOLVED] PyQt integration in MotionBuilder2012 x64
  RSS 2.0 ATOM  

[SOLVED] PyQt integration in MotionBuilder2012 x64
Rate this thread
 
60286
 
Permlink of this thread  
avatar
  • gon2024
  • Posted: 23 September 2011 02:41 AM
  • Total Posts: 8
  • Joined: 13 April 2010 03:12 AM

Hi everyone.

I manage to install PyQt module in my computer from this forum : Area Tutorial
And with this site’s post: Nathan Horne
Where I downloaded PyQt-Py2.6-x64-gpl-4.8.3-1.exe

It works very well in Maya2012 x64 !

But, in Motionbuilder2012 x64, I am able to import PyQt4.QtCore but NOT PyQt4.QtGui !

Python 2.6.4 (r264:75708Oct 26 200907:36:50[MSC v.1500 64 bit (AMD64)] on win32
>>> import os
>>> os.sys.path.append(MYINSTALLPATH)
>>> 
import PyQt4
>>> import PyQt4.QtCore
>>> print PyQt4.QtCore.__file__
MYINSTALLPATH
+'\PyQt4\QtCore.pyd'
>>> print dir(PyQt4)
['QtCore''__builtins__''__doc__''__file__''__name__''__package__''__path__']
>>> import PyQt4.QtGui
Traceback 
(most recent call last):
  
File "<MotionBuilder>"line 1in <module>
ImportErrorDLL load failedThe specified procedure could not be found.

I also tried to add : site.main() without any success.
If I am right, the problem is that Maya deals well with PyQt 4.8, but MoBu needs specificly a 4.5 version of it.
But with several tries, I haven’t find anything in 64bits to download.
I really want to do some uiTools in both of the softwares with one code only, did anyone have this kind of problem ? Do you have any ideas about a workaround ?



Replies: 0
avatar
  • gon2024
  • Posted: 26 September 2011 03:53 AM

Ok guys, I finally manage to find one !

You can find it there :
http://code.google.com/p/pyqt4-win64-binaries/downloads/list

Installing this version, wherever you want, and both Maya2012x64 and Motionbuilder2012x64
will now import PyQt4.

By the way, I don’t find very accurate to install again Python on C:\Python26 you don’t need that I think.
I keep my tools and UI in a network repository, and add a startup linker to do:

import os
os.sys.path.append("""MY_NETWORK_FOLDER""")

It is quite usefull when a whole studio needs your tools without installing dependancies and linking to them.



Replies: 0