
thx Tom, tried it, could not make it work. viewer2 never was recognized. This and because of the lighting problem, I decided to cut bait. Instead I created a hot key to toggle pCamera and pSideView. another USBHID hotkey will be setup to get me into lighting/shininess. How can I bring up shininess dialog? after that I want to connect up the light xy positions to a joystick; intensity and color to some knobs and sliders. I am thinking the shininess values will need special attention. the slider gets me increments of 0.1; but depending on sharpness I need to casually adjust at 0.01 So at this point my focus for the next few days is going deep into lighting. Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine ________________________________________ From: Tom Goddard [goddard@sonic.net] Sent: Wednesday, July 10, 2013 11:29 AM To: Dougherty, Matthew T Cc: chimera-dev@cgl.ucsf.edu Subject: Re: [chimera-dev] camera dialog 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