
Hi Matt, If you call Volume_Eraser_Dialog() then you get a new dialog. Here's the way to do it.
from VolumeEraser import gui d = gui.volume_eraser_dialog(create = True) r = d.sphere_radius() 25.3500015259 s = d.sphere_radius_scale.value() 25.3500015259 rnew = 100 d.sphere_radius_scale.set_value((rnew/r)*s) r = d.sphere_radius() 100.0
Tom On Mar 6, 2014, at 7:21 PM, "Dougherty, Matthew T" <matthewd@bcm.edu> wrote:
Using python I would like to determine the eraser radius, calculate a new radius and update the widget.
I can modify the radius value, but unable to update the parameter on the widget.
Using this from VolumeEraser.gui import Volume_Eraser_Dialog v=Volume_Eraser_Dialog() r=v.sphere_radius_scale.value() print r r=r*0.5 v.sphere_radius_scale.set_value(r)
If I have a widget radius of 8000,it accesses a default value of 2 rather than the value in the dialog box, and changes the sphere radius to 1. printing v I get the impression that I am access a different widget/gui.
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