
On Oct 12, 2015, at 10:14 PM, Dougherty, Matthew T <matthewd@bcm.edu> wrote:
I would like to tie a USB foot pedal to the model panel rename button.
I can get the foot pedal signal into my chimera extension. From an extension, what would be the easiest way to Python code the activation of the model panel button?
Hi Matt, I’m envisioning some kind of Rube Goldberg setup where you are. Is anything steam powered? :-) Anyway, the Model Panel isn’t exactly setup for reaching in like that, but nonetheless the code would be: from ModelPanel import renameCmd from ModelPanel.base import _mp as mp renameCmd(mp.selected(moleculesOnly=False, groupsOkay=True)) You might want to test whether mp.selected actually returns something non-empty before then calling renameCmd... —Eric Eric Pettersen UCSF Computer Graphics Lab