
Hi Matt, The ViewerDialog() call always constructs a new viewer. So if you want to use this code to position your two viewer and only create the second one on the first time instead of d2 = viewing.ViewerDialog(viewer = viewer) use code that checks if you already created the second viewer like this if hasattr(chimera, 'viewer2'): d2 = chimera.viewer2 else: d2 = viewing.ViewerDialog(viewer = viewer) chimera.viewer2 = d2 Tom On Jul 10, 2013, at 12:52 AM, "Dougherty, Matthew T" wrote:
here is what I have implemented.
the first time it executes, everything is fine. second time it executes D2 begins stacking up viewer dialog windows.
from chimera import dialogs from chimera import viewing, viewer
d = dialogs.find('View Editor', create = 1) d.enter() top = d.uiMaster().winfo_toplevel() top.autoposition = False s = top.wm_geometry() top.wm_geometry('%dx%d+%d+%d' % (400,350,420,30)) d.nb.raise_page('pCamera')
d2 = viewing.ViewerDialog(viewer = viewer) d2.enter() top2 = d2.uiMaster().winfo_toplevel() top2.autoposition = False s2 = top2.wm_geometry() top2.wm_geometry('%dx%d+%d+%d' % (400,350,10,30)) d2.nb.raise_page('pSideView')
Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine ________________________________________ From: Tom Goddard [goddard@sonic.net] Sent: Tuesday, July 09, 2013 1:51 PM To: Dougherty, Matthew T Cc: chimera-dev@cgl.ucsf.edu Subject: Re: [chimera-dev] camera dialog
Hi Matt,
The following Python will bring up a second viewing dialog with the camera and side view tabs. They both work in some simple tests with the current daily build. For some reason the second one does not have the Lighting tab. There may be other problems. It is unlikely the dialog positions and shown tabs would be saved in a session.
from chimera import viewing, viewer d = viewing.ViewerDialog(viewer = viewer)
Tom
On Jul 8, 2013, at 3:29 PM, "Dougherty, Matthew T" <matthewd@bcm.edu> wrote:
using python is it possible to put up two camera dialogs? would like to have camera & sideview up at the same time, or lighting and camera up at the same time.
Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev