[chimera-dev] camera dialog
Tom Goddard
goddard at sonic.net
Thu Jul 11 17:14:07 PDT 2013
Hi Matt,
There is a Chimera menu entry Tools / Viewing Control / Shininess that shows the Shininess pane of the Lighting panel. Searching high and low in chimera/share (I use grep on all Python files) I found the code for this menu entry in
share/Shiny
So do
import Shiny
Shiny.display()
to show the shininess panel. Here's the display code (from Shiny/__init__.py)
def display():
import Lighting
controller = Lighting.get()
from chimera.extension.StdTools import raiseViewingTab
raiseViewingTab(controller.Name)
controller.showInterface(controller.Interface_Shininess)
To control shininess and light directions I suggest using the "lighting" command. Then you will not be limited to slider step sizes.
http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/lighting.html
Tom
On Jul 10, 2013, at 6:14 PM, "Dougherty, Matthew T" wrote:
> 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 at sonic.net]
> Sent: Wednesday, July 10, 2013 11:29 AM
> To: Dougherty, Matthew T
> Cc: chimera-dev at 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 at sonic.net]
>> Sent: Tuesday, July 09, 2013 1:51 PM
>> To: Dougherty, Matthew T
>> Cc: chimera-dev at 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 at 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 at cgl.ucsf.edu
>>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
>>>
>>
>>
>
>
More information about the Chimera-dev
mailing list