Finally found some time to get Steve Caron's PyQtForSoftimage plugin up
and running. Working great so far! Big thanks to Steve and any other
contributors! Among other things, I'm impressed with how much more
responsive PyQt is in pulling data from Shotgun.
I have two questions:
1) Are Pick Sessions possible?
2) I'm having an issue where my PyQt UIs don't refresh unless I restart
Soft. Instead of compiling a .ui file, or even coding the UI by hand in
the constructor, I'm using Pyqt4.uic to interpret the UI at runtime.
Like so...
/
--------------------------------------------------------------------------------------
from PyQt4 import uic
from PyQt4.QtGui import QMainWindow
form_class = uic.loadUiType(r"Path\to\my\uiFile.ui")
class MainWindow( QMainWindow, form_class ):
def __init__(self, parent):
QMainWindow.__init__(self, parent)
self.setupUi(self)
def XSILoadPlugin( in_reg ):
in_reg.Name = "someTool"
in_reg.Author = "Tim Crowson"
in_reg.RegisterCommand( "someTool" )
def someTool_Execute():
import sip
sianchor = Application.getQtSoftimageAnchor()
sianchor = sip.wrapinstance( long(sianchor), QMainWindow )
ui = MainWindow( sianchor )
ui.show()/
/--------------------------------------------------------------------------------------
/
So far, this works really well. I'm getting my form_class outside any
class or function definition, so Softimage runs this at startup. But
this means that my form_class does not get updated by simply 'Reloading'
the plugin or running 'Update All' from the plugin manager (should it?).
I have to actually restart Softimage to see any UI updates. I'm
wondering how I can go this route and update my UI without having to
restart Soft.
--
Signature
*Tim Crowson
*/Lead CG Artist/
*Magnetic Dreams Animation Studio, Inc.
*2525 Lebanon Pike, Building C. Nashville, TN 37214
*Ph* 615.885.6801 | *Fax* 615.889.4768 | www.magneticdreams.com
[email protected]