[chimera-dev] Model panel rename
Eric Pettersen
pett at cgl.ucsf.edu
Tue Oct 13 14:31:33 PDT 2015
> On Oct 12, 2015, at 10:14 PM, Dougherty, Matthew T <matthewd at 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
More information about the Chimera-dev
mailing list