Installing PyQtForSoftimage


I read somewhere that installing PyQtForSoftimage could be difficult, so I gave it a try. I didn’t have any problems.

For my test, I installed PyQtForSoftimage in Softimage 2014 SP2, using Python 2.7.3 and pywin32 218.

Here’s a recipe that will work with Softimage 2014 and earlier. But if you’re using Softimage 2014, you can skip the part about using the system Python. Instead, use PYTHONPATH to point to folder where PyQt4 is installed (hat tip: Tim C).

On-sentence-summary
You need to switch from the Python installed with Softimage to the system Python (and pywin32), install PyQT, and then install the PyQtForSoftimage addon.

General Recipe

  1. Download and install Python 2.7.x (Note that Softimage ships with Python v2.7.3).
  2. Download and install pywin32 (Softimage ships with pywin32 217).
  3. In the Softimage Scripting preferences, clear the Use Python Installed with Softimage check box. Then restart Softimage.
    PythonInstalledWithSoftimage

    Or edit your prefs file (%XSI_USERHOME%\Data\Preferences\default.xsipref) and add this line: scripting.sipython = False

  4. Check that Python is working in Softimage. In the script editor, run a Python snippet like this: Application.LogMessage( “Hello World” )
  5. Download and install PyQt.
  6. Download (right-click and then click Save As) and install the PyQtForSoftimage addon.
  7. Check that everything is working. Open the Plug-in Manager, find PyQtForSoftimage, and run some of the examples.
    PyQt_Example

    I found that the ExampleDialog and ExampleSignalSlot examples did pop up dialogs, but the Log Text button didn’t log anything to the history log.

Softimage 2014 Recipe

  1. Download and install PyQt.
  2. Set the PYTHONPATH environment variable to point to the location of PyQt4. You could do this in setenv.bat, or in the System environment variables.
  3. Download (right-click and then click Save As) and install the PyQtForSoftimage addon.
  4. Check that everything is working. Open the Plug-in Manager, find PyQtForSoftimage, and run some of the examples.

15 thoughts on “Installing PyQtForSoftimage

  1. Actually, since Softimage 2014 uses Python 2.7.3, you don’t have to tell Softimage to use the Windows Python anymore, you can leave that as is. We’re running PyQt apps ‘out-of-the-box’ with no changes to Softimage 2014 apart from installing PyQtForSoftimage addon itself. PyQt4 can be installed anywhere the PYTHONPATH variable looks.

    Or maybe I’m misunderstanding… ?

    • What you say sounds right, I’ll try it.
      For Softimage 2013 and earlier, I assume I have to use the system Python.

      It’s just that my starting point was something posted recently on the Softimage list, which basically said “install PyQt, use system Python, and that’s it”.

      • Yeah for versions prior to 2014, you pretty much had to use the system Python. So much easier with 2014… 😀

    • can i get some more background on this? why does this work now but didn’t work earlier? was it because pyqt4 downloads were not available for the version of python softimage shipped with prior to 2014?

      or is there some new behavior with the PYTHONPATH env variable?

      • I thought the addon itself required 2.7.3. Maybe not? As for PYTHONPATH, I’m not aware of any changes there. All I know is that with 2014, and with PyQt4 installed in a location accessible to PYTHONPATH (network location, in our case), Soft loads those modules and the addon lets us run PyQt apps without any additional tweaks. Crazy smooth, actually.

      • I just assumed that you were using the system Python because older Softs had 2.6.x and you needed 2.7.x. But it if PyQtForSoftimage never worked with the Softimage Python before, I suspect maybe something changed with the Softimage Python that magically fixed the problem.

      • Replying to Stephen’s post below….

        Actually I think you’re right about the 2.6.4 Python in older versions of Soft: that was the reason we switched to using the system 2.7.3. But I’m pretty sure PyQt was available for 2.6.4, so that’s why I was leaning toward some requirement on the addon side. To be perfectly honest, I don’t completely recall what the requirements were. I figured Steve would know…

      • ok i tried your setup with the PYTHONPATH and softimage version of python with success… but this would be any different in softimage 2013. except you need to sync up your versions of python. ie. install the same version of pyqt4 which supports the version of python softimage ships with.

  2. thanks stephen!

    i am surprised by the log text not working. can you check the code at line 40 in the pyqt_example.py?

    it should just be Application.LogMessage(). if it is, then something is busted with the call to get the lineedit.text()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s