Author Topic: Can I load the qb python module directly in Maya?  (Read 3108 times)

Scot Brew

  • Hero Member
  • *****
  • Posts: 272
    • PipelineFX
Can I load the qb python module directly in Maya?
« on: October 15, 2008, 06:59:27 AM »
Yes, though you may need to adjust your PYTHONPATH or sys.path.

For example, using Maya 2008 64-bit on a XP 64-bit machine, we were able to load in the qb python module and execute calls.

Here are the commands run from Maya's Script Editor (Python):
import sys
print sys.path
sys.path.insert(0, r'C:\Program Files\pfx\qube\api\python\qb')
print sys.path
import qb
print qb.version()
print qb.hostinfo()[0]

Here are a few key lines from the results showing that it does work:
import sys
print sys.path
sys.path.insert(0, r'C:\Program Files\pfx\qube\api\python\qb')
print sys.path
import qb
print qb.version()
print qb.hostinfo()[0]
...
5.3-0
Host({'description': '', 'lastupdate': 1222116464, 'restrictions': '', 'jobtypes': '...' }]