Opened 8 years ago
Closed 8 years ago
#1044 closed defect (not a bug)
Need "ribbon drawing finished" trigger
| Reported by: | Tristan Croll | Owned by: | Conrad Huang |
|---|---|---|---|
| Priority: | moderate | Milestone: | |
| Component: | Depiction | Version: | |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
To provide live symmetry visualisation for ribbons it looks to me like the easiest approach is to make a copy of the ribbon drawing so I can re-color it and tile it as necessary. This works and is fast, but at the moment coping with ribbon display changes is problematic. I thought that simply triggering a redraw on the ribbon_display changed event should do it, but when that trigger is fired the ribbon drawing hasn't changed yet. Would it be possible to have a trigger that's guaranteed to fire *after* the ribbon's been redrawn?
Change History (3)
comment:1 by , 8 years ago
follow-up: 2 comment:2 by , 8 years ago
I’m afraid I want the latter. This is to do with #822 - my improved implementation of crystallographic (and eventually non-crystallographic) symmetry visualisation. Basically, given a centre, radius and a set of symmetry matrices, it provides a drawing of all symmetry atoms/bonds inside the sphere (fast enough to navigate live with negligible slowdown for spheres up to about 50 Angstroms radius). It’s helpful to also provide the symmetry copies of the ribbon (just tiling the whole ribbon for each copy with any atoms in the sphere). In order to differentiate the symmetry copies from the main model I darken them, which is easiest achieved by copying the ribbon drawing geometry into fresh Drawing objects then applying the modified vertex colours. But at present I have no neat way of catching when the ribbon drawing changes. Tristan Croll Research Fellow Cambridge Institute for Medical Research University of Cambridge CB2 0XY
comment:3 by , 8 years ago
| Resolution: | → not a bug |
|---|---|
| Status: | assigned → closed |
Ah - never mind. Turns out the 'frame drawn' trigger was what I was searching for.
I'm not sure I understand the question. Are you trying to force a ribbon update or get notified when the ribbon is updated?
The former question is easier to answer. Currently, ribbons are updated as part of the redraw caused by the firing of a "graphics update" trigger. As part of that redraw, ribbons of structures that are not marked as "something with ribbons may have changed" are not recomputed. To mark a structure for ribbon rebuild, in Python it's
and in C++ it's
where
sis anAtomicStructure/Structureinstance.If you want the latter (notification when ribbon is updated), there is currently no facility for doing so.