[Bf-committers] ESC Key handling proposal
Daniel Genrich
daniel.genrich at gmx.net
Thu May 23 22:21:04 CEST 2013
Hey,
I've come upon a very weird problem when using the ESC key.
When I am e.g. baking a fluid simulation, then press alt-a (3dview
animation playback loop) and then press "ESC" the animation playback in
the 3dview is stopped BUT also is the fluidsim bake. This happens with
alot of stuff too, like renderer, compositor, etc.
They all have in common that they rely on the "G.is_break" variable
which is set when ESC is pressed (wm_event_system.c line 3111).
In interface_templates.c (line 2817) we have a nice differentiated
function which could serve as example.
In the moment it is very easy to loose valueable work by accidently
pressing ESC because you want to stop the 3dview animation playback .
My proposal for wm_event_system.c line 3111:
if(ESC_PRESSED)
{
if(animation_is_running)
{
WM_jobs_stop(CTX_wm_manager(C), CTX_data_scene(C), NULL); // or
event B_STOPANIM in do_jobs_running()
}
else
{
G.is_break = TRUE;
}
Looking forward to your feedback,
Daniel
More information about the Bf-committers
mailing list