Hi Jared, Glad you liked and thank you for the patch and incentive. I'll pull it on the repo and create a wiki page.
Best regards, Pedro Lacerda Em qua, 30 de out de 2019 14:16, Jared Sampson <jared.samp...@columbia.edu> escreveu: > Hi Pedro - > > I just took a look at the plugin, and it seems quite convenient. I > imagine using this as a tool to complement PyMOL's default scenes, as a way > of looking at different representations or objects from the same viewpoint. > > Looking at the code, I was curious about all the Q* global variable > assignments near the top, and thought they might be cleaner and easier to > maintain as imports. (Plus many of them were unused in the plugin code.) > Apparently due to the way pymol.Qt is a wrapper for PyQt5, we can't do > `from pymol.Qt.QtWidgets import *`, but the following does work: > > ``` > from pymol.Qt import QtWidgets, QtCore, QtGui > ``` > > then use e.g. `QtWidgets.QWidget()` in the body of the code; see the > attached patch (I hope you don't mind my sending it!). As a side note, > this appears to be—at least unofficially—a preferred way to do it, > according to an example plugin > <https://github.com/Pymol-Scripts/pymol2-demo-plugin/blob/master/__init__.py#L51> > by > PyMOL lead developer Thomas Holder (speleo3). > > Also, I would encourage you to add your plugin to the PyMOL scripts repo > <https://github.com/Pymol-Scripts/Pymol-script-repo> on Github, and to > create a PyMOL Wiki page for it. > > Thanks for sharing! > > Cheers, > Jared > > On October 26, 2019 at 12:39:35 PM, Pedro Lacerda (pslace...@gmail.com) > wrote: > > And the plugin, of course! > > Em sáb, 26 de out de 2019 às 13:37, Pedro Lacerda <pslace...@gmail.com> > escreveu: > >> Hi, >> >> I just made a graphical plugin to set and get views. It uses the set_view >> and get_view functions. >> >> It is available in the last option ("Show views") on the "Scene" menu. >> Double-click to rename a view. Erase it's name to delete it. >> >> In order to persist data in the PSE session it stores data into the >> mesh_clear_selection setting. It was the only way I found. >> >> How to store arbitrary data on the session? Some "ostate" string settings >> are preserved on the PSE session. But not all support set arbitrary data >> (eg, bg_image_filename). It is very hackish and not a definite solution. >> >> Just wondering, maybe a hidden "setting" (not visible to can be be used >> as a key-value store. It would hold serialized data (eg json or pickle) and >> have a pair of functions set_key(key, obj) and get(key) that read and write >> the setting. >> >> Another great addition would be able to set arbitrary strings to objects >> and atoms. But in case of implementing a key-value store would be some >> overlap. >> >> Best regards, >> >> >> [image: image.png] >> >> -- >> Pedro Sousa Lacerda >> >> >> *Laboratório de Bioinformática e Modelagem Molecular* >> *Faculdade de Farmácia / UFBA* >> >> *@pslacerda* >> >> *+55 71 9 9981-1856* >> > > > -- > Pedro Sousa Lacerda > > > *Laboratório de Bioinformática e Modelagem Molecular* > *Faculdade de Farmácia / UFBA* > > *@pslacerda* > > *+55 71 9 9981-1856* > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net > Unsubscribe: > https://sourceforge.net/projects/pymol/lists/pymol-users/unsubsc > <https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe> > >
_______________________________________________ PyMOL-users mailing list Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe