Setting Parameter Spreadsheet through python

   2516   6   3
User Avatar
Member
517 posts
Joined: Dec. 2013
Offline
Hi all!,

Just messing around with some Python stuff and I was wondering, is there a way to fill in the Parameter Spreadsheet through a python scripted tool?

Opening it up is pretty straightforward -
desktop = hou.ui.curDesktop()
pane = desktop.createFloatingPane(hou.paneTabType.ParmSpreadsheet)

But I cant seem to find anything on accessing that once its open.
I'm trying to fill these in…

Any ideas?

Thanks,
Pete
Edited by peteski - Jan. 6, 2017 05:01:01
User Avatar
Member
2537 posts
Joined: June 2008
Offline
You can always try…
print dir(pane)
and examine what other methods or properties you have a handle to.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
517 posts
Joined: Dec. 2013
Offline
Hey thanks! I had no idea about that, I imagine it's gonna come in handy.
I'll check it out
User Avatar
Member
517 posts
Joined: Dec. 2013
Offline
Hey I gave that a try and ended up with these.
pane.__class__
pane.__delattr__
pane.__dict__
print pane.__doc__
pane.__eq__
pane.__format__
pane.__getattribute__
pane.__hash__
pane.__init__
pane.__module__
pane.__ne__
pane.__new__
pane.__reduce__
pane.__reduce_ex__
pane.__repr__
pane.__setattr__
pane.__sizeof__
pane.__str__
pane.__subclasshook__
pane.__swig_destroy__
pane.__weakref__
pane.clone
pane.close
pane.isCurrentTab
pane.isFloating
pane.isPin
pane.linkGroup
pane.name
pane.pane
pane.setIsCurrentTab
pane.setLinkGroup
pane.setName
pane.setPin
pane.setType
pane.this
pane.thisown
pane.type

The ones at the bottom are all pretty general like is pinned or panel name and stuff. The ones at the top with the underscores are kinda weird, there seems to be no documentation for them.
I'm struggling to find anything to get the job done

P.
Edited by peteski - Jan. 6, 2017 19:30:03
User Avatar
Member
2537 posts
Joined: June 2008
Offline
Darn, I was hoping there was simply a list of rectangles under pane. Then you might be able to locate one of those input fields and populate it.

If you were on Windows you could do it with a brute force mouse move and click issued to screen coordinates within the target rectangular area of the Op Mask field. I'm not sure how to control the mouse position and click on OSX or Linux. But you might want to think along those lines. If you can control where the pane pops up on the screen, you can then assume where the other two fields are located based on pure screen coordinates. Issue a mouse move and click to that location then issue some kind of system send keyboard command with the data you want to populate the field with.
Controlling the mouse and keyboard directly is certainly a hackey approach but the API may need extending to provide access to these fields. Perhaps file a feature request to support@sidefx.com.
Edited by Enivob - Jan. 7, 2017 21:35:14
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
517 posts
Joined: Dec. 2013
Offline
Enivob
Darn, I was hoping there was simply a list of rectangles under pane. Then you might be able to locate one of those input fields and populate it.
Yeah, it's a shame I was hoping there might be some access to the subsections of the panel. I'll look into a more hacky approach I guess
Unfortunately I can't get to the opinput field by shortcut keys alone, that might have made it a little easier. I thought maybe tab might have worked once it was focused.
Anyway, I'll see what I can come up with.
P.
Edited by peteski - Jan. 7, 2017 23:18:13
User Avatar
Member
133 posts
Joined: July 2005
Offline
If you are on 15.5 or higher, there is a way to manipulate Houdini QT interface through hou.ui.mainQtWindow() which returns main window QWidget. You have access to all the descendants from there. I think it may be a bit of a hacky way to do it, but it should work. From the docs it seems it was only meant as means to attach your custom interfaces to main window, but I tried calling methods on children and it seems to work fine.
  • Quick Links