-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create position from script and send them to the GUI - feature request #162
Comments
Hi @romainGuiet - thanks for the kind words!
Interesting! There is probably a hacky way to get this working already which might be enough for you... let me know what you think import napari
from napari_animation._qt.animation_widget import AnimationWidget
viewer = napari.Viewer()
animation_widget = AnimationWidget(viewer)
animation = animation_widget.animation
# capture keyframes Let me know if this does the sort of thing you're looking for |
and are created here... napari-animation/napari_animation/animation.py Lines 79 to 80 in 78eef3e
The list of key frames is available at napari-animation/napari_animation/animation.py Lines 17 to 29 in 78eef3e
So you could jump in there to modify them programmatically - whether or not those changes will be updated in the GUI I'm not sure without testing |
Thank you for your swift answer @alisterburt ! I'm probably doing something wrong because nothing different happened 😅 I tried with (or without) the napari-animation widget opened before running the lines below but no key_frame appeared in the widget ...
|
Strange... I was expecting that to work and I'm not sure why it doesn't, the 'view' you see should change whenever the model (the key frame list) changes I could delve into this but I don't really need the feature myself and it would take more time than I have right now... maybe someone interested can try to take a look :) |
Dear @team ,
Thank you for this great tool !
It would be nice if after creating the position from a script it would be possible to send them to the GUI (something like
animation.send_keyframe()
? ), so one can eventually correct the order manually.NOTE : when double-clicking on a key_frame in the GUI we can change the name, is it possible to do so using code ?
Thank you again ,
Romain
The text was updated successfully, but these errors were encountered: