Re: Two questions about PyQt in Soft (re: Pick Sessions, UI Refresh)

2012-08-25 Thread Simon Anderson
Starting to plan one soon man :) will have a tut out sometime in the
future. At the moment bogged down with alot, but I have a plan in the pipe
for a Qt tut.

Qt for the win man!! :D

On Sat, Aug 25, 2012 at 6:51 AM, Tim Crowson tim.crow...@magneticdreams.com
 wrote:

  Everything I'm working on now is internal pipeline stuff, but considering
 how blazingly fast I can get stuff up and running thanks to Designer and
 Eclipse, it will be a breeze to redo something like my Multi-Importer.

 This has been a major win of the week for me. Thanks!
 -Tim



 On 8/24/2012 3:35 PM, Steven Caron wrote:

 great news!

 i dont get to use the pyqt interfaces as much as i want to (yet) and i
 want to hear more from the community on the ups and downs of jo's and my
 plugin.

 i also am hoping some people could start sharing their examples? maybe
 some tutorials? wink wink

 s

 On Fri, Aug 24, 2012 at 1:31 PM, Tim Crowson 
 tim.crow...@magneticdreams.com wrote:

  Steve, I can confirm that yes, this does allow me to refresh as
 expected. It's actually quite fast. Close the tool in Soft, make some
 changes in Designer, save, and relaunch the tool in Soft. Changes appear
 instantly. Nice.


 -Tim



 --







-- 
---
Simon Ben Anderson
blog: http://vinyldevelopment.wordpress.com/


Re: Two questions about PyQt in Soft (re: Pick Sessions, UI Refresh)

2012-08-24 Thread Tim Crowson
Ah! I think I was looking at an older Example file. Looking at this new 
one, yeah, that seems like a good way to go.


Good to know about the Pick Session stuff. Thanks!

-Tim



On 8/23/2012 6:13 PM, Steven Caron wrote:
1) you can launch softimage code from a pyqt app, so use a normal 
pickelement, pickobject, or pickposition. then process the return 
values in your python code.


2) i haven't done enough development using uic files so i haven't the 
experience with this but could you instead use the pyqt_example.py way 
of using uic files and let me know if that refreshes?


https://github.com/caron/PyQtForSoftimage/blob/master/src/pyqt_example.py

s

On Thu, Aug 23, 2012 at 2:01 PM, Tim Crowson 
tim.crow...@magneticdreams.com 
mailto:tim.crow...@magneticdreams.com wrote:


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(rPath\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.

-- 


*Tim Crowson
*/Lead CG Artist/

*Magnetic Dreams Animation Studio, Inc.
*2525 Lebanon Pike, Building C. Nashville, TN 37214
*Ph* 615.885.6801 tel:615.885.6801 | *Fax* 615.889.4768
tel:615.889.4768 | www.magneticdreams.com
http://www.magneticdreams.com
tim.crow...@magneticdreams.com mailto:tim.crow...@magneticdreams.com




--
Signature



Re: Two questions about PyQt in Soft (re: Pick Sessions, UI Refresh)

2012-08-24 Thread Steven Caron
so you are confirming the development of the ui using qt designer and
.ui/.uic files is more dynamic? refreshes when you expect it to?

s

On Fri, Aug 24, 2012 at 6:55 AM, Tim Crowson tim.crow...@magneticdreams.com
 wrote:

  Ah! I think I was looking at an older Example file. Looking at this new
 one, yeah, that seems like a good way to go.

 Good to know about the Pick Session stuff. Thanks!

 -Tim




 On 8/23/2012 6:13 PM, Steven Caron wrote:

 1) you can launch softimage code from a pyqt app, so use a normal
 pickelement, pickobject, or pickposition. then process the return values in
 your python code.

 2) i haven't done enough development using uic files so i haven't the
 experience with this but could you instead use the pyqt_example.py way of
 using uic files and let me know if that refreshes?

 https://github.com/caron/PyQtForSoftimage/blob/master/src/pyqt_example.py

 s

 On Thu, Aug 23, 2012 at 2:01 PM, Tim Crowson 
 tim.crow...@magneticdreams.com wrote:

  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(rPath\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.

 --


 *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
 tim.crow...@magneticdreams.com





 --






Re: Two questions about PyQt in Soft (re: Pick Sessions, UI Refresh)

2012-08-24 Thread Tim Crowson
Inconclusive so far, that comment was based strictly on how the code 
appeared. Haven't been able to test it yet: I've been sidetracked by a 
more insidious problem (see other thread) where Softimage insists on 
using its own Python rather than the system's on some of our boxes... 
(seems we might have to resort to installing pywin locally on each one, 
since we can't get pywin to play ball from our network site-packages).


-Tim

On 8/24/2012 2:09 PM, Steven Caron wrote:
so you are confirming the development of the ui using qt designer and 
.ui/.uic files is more dynamic? refreshes when you expect it to?


s

On Fri, Aug 24, 2012 at 6:55 AM, Tim Crowson 
tim.crow...@magneticdreams.com 
mailto:tim.crow...@magneticdreams.com wrote:


Ah! I think I was looking at an older Example file. Looking at
this new one, yeah, that seems like a good way to go.

Good to know about the Pick Session stuff. Thanks!

-Tim




On 8/23/2012 6:13 PM, Steven Caron wrote:

1) you can launch softimage code from a pyqt app, so use a normal
pickelement, pickobject, or pickposition. then process the return
values in your python code.

2) i haven't done enough development using uic files so i haven't
the experience with this but could you instead use the
pyqt_example.py way of using uic files and let me know if that
refreshes?

https://github.com/caron/PyQtForSoftimage/blob/master/src/pyqt_example.py

s

On Thu, Aug 23, 2012 at 2:01 PM, Tim Crowson
tim.crow...@magneticdreams.com
mailto:tim.crow...@magneticdreams.com wrote:

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(rPath\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.

-- 


*Tim Crowson
*/Lead CG Artist/

*Magnetic Dreams Animation Studio, Inc.
*2525 Lebanon Pike, Building C. Nashville, TN 37214
*Ph* 615.885.6801 tel:615.885.6801 | *Fax* 615.889.4768
tel:615.889.4768 | www.magneticdreams.com
http://www.magneticdreams.com
tim.crow...@magneticdreams.com
mailto:tim.crow...@magneticdreams.com




-- 





--
Signature



Re: Two questions about PyQt in Soft (re: Pick Sessions, UI Refresh)

2012-08-24 Thread Tim Crowson
Steve, I can confirm that yes, this does allow me to refresh as 
expected. It's actually quite fast. Close the tool in Soft, make some 
changes in Designer, save, and relaunch the tool in Soft. Changes appear 
instantly. Nice.


-Tim

On 8/24/2012 2:09 PM, Steven Caron wrote:
so you are confirming the development of the ui using qt designer and 
.ui/.uic files is more dynamic? refreshes when you expect it to?


s

On Fri, Aug 24, 2012 at 6:55 AM, Tim Crowson 
tim.crow...@magneticdreams.com 
mailto:tim.crow...@magneticdreams.com wrote:


Ah! I think I was looking at an older Example file. Looking at
this new one, yeah, that seems like a good way to go.

Good to know about the Pick Session stuff. Thanks!

-Tim




On 8/23/2012 6:13 PM, Steven Caron wrote:

1) you can launch softimage code from a pyqt app, so use a normal
pickelement, pickobject, or pickposition. then process the return
values in your python code.

2) i haven't done enough development using uic files so i haven't
the experience with this but could you instead use the
pyqt_example.py way of using uic files and let me know if that
refreshes?

https://github.com/caron/PyQtForSoftimage/blob/master/src/pyqt_example.py

s

On Thu, Aug 23, 2012 at 2:01 PM, Tim Crowson
tim.crow...@magneticdreams.com
mailto:tim.crow...@magneticdreams.com wrote:

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(rPath\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.

-- 


*Tim Crowson
*/Lead CG Artist/

*Magnetic Dreams Animation Studio, Inc.
*2525 Lebanon Pike, Building C. Nashville, TN 37214
*Ph* 615.885.6801 tel:615.885.6801 | *Fax* 615.889.4768
tel:615.889.4768 | www.magneticdreams.com
http://www.magneticdreams.com
tim.crow...@magneticdreams.com
mailto:tim.crow...@magneticdreams.com




-- 





--
Signature



Re: Two questions about PyQt in Soft (re: Pick Sessions, UI Refresh)

2012-08-24 Thread Steven Caron
great news!

i dont get to use the pyqt interfaces as much as i want to (yet) and i want
to hear more from the community on the ups and downs of jo's and my plugin.

i also am hoping some people could start sharing their examples? maybe some
tutorials? wink wink

s

On Fri, Aug 24, 2012 at 1:31 PM, Tim Crowson tim.crow...@magneticdreams.com
 wrote:

  Steve, I can confirm that yes, this does allow me to refresh as expected.
 It's actually quite fast. Close the tool in Soft, make some changes in
 Designer, save, and relaunch the tool in Soft. Changes appear instantly.
 Nice.


 -Tim





Re: Two questions about PyQt in Soft (re: Pick Sessions, UI Refresh)

2012-08-24 Thread Tim Crowson
Everything I'm working on now is internal pipeline stuff, but 
considering how blazingly fast I can get stuff up and running thanks to 
Designer and Eclipse, it will be a breeze to redo something like my 
Multi-Importer.


This has been a major win of the week for me. Thanks!
-Tim


On 8/24/2012 3:35 PM, Steven Caron wrote:

great news!

i dont get to use the pyqt interfaces as much as i want to (yet) and i 
want to hear more from the community on the ups and downs of jo's and 
my plugin.


i also am hoping some people could start sharing their examples? maybe 
some tutorials? wink wink


s

On Fri, Aug 24, 2012 at 1:31 PM, Tim Crowson 
tim.crow...@magneticdreams.com 
mailto:tim.crow...@magneticdreams.com wrote:


Steve, I can confirm that yes, this does allow me to refresh as
expected. It's actually quite fast. Close the tool in Soft, make
some changes in Designer, save, and relaunch the tool in Soft.
Changes appear instantly. Nice.


-Tim




--
Signature



Re: Two questions about PyQt in Soft (re: Pick Sessions, UI Refresh)

2012-08-23 Thread Steven Caron
1) you can launch softimage code from a pyqt app, so use a normal
pickelement, pickobject, or pickposition. then process the return values in
your python code.

2) i haven't done enough development using uic files so i haven't the
experience with this but could you instead use the pyqt_example.py way of
using uic files and let me know if that refreshes?

https://github.com/caron/PyQtForSoftimage/blob/master/src/pyqt_example.py

s

On Thu, Aug 23, 2012 at 2:01 PM, Tim Crowson tim.crow...@magneticdreams.com
 wrote:

  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(rPath\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.

 --


 *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
 tim.crow...@magneticdreams.com