Blender Git Commit Log

Git Commits -> Revision 4154e48

Revision 4154e48 by Ton Roosendaal (master)
February 16, 2009, 12:14 (GMT)
2.5

Proper integration of File-selecting in WM. The communication
flow was flawed. :) Main problem was that filewindow can change
the screen context entirely, and should not do this directly on
a call inside an operator. Another problem was that the operator
ownership was handed over to SpaceFile, which is asking for
problems if you want to execute the operator with proper context
later on.

Solution is simple; window handlers already are valid owners of
operators and can manage context, so instead of directly talking
to the 'file space', you give the operator to a new handler this
way:

WM_event_add_fileselect(C, op);

This handler then listens to events (OPEN, EXEC, CANCEL) sent
by the WM or by the filewindow itself. This way local context
operators (like "open new image in imagewindow") will survive
a full-window fileselector fine, and in future also secondary
windows browsing files.

Two bugfixes included in this commit too:
- Add sequence menus in Sequencer used wrong context.
- When handler executes operators, it sets stored context now
by first checking if this is still valid.





Commit Details:

Full Hash: 4154e48c053caf947f2668a168ce38aa10b8481b
SVN Revision: 18992
Parent Commit: f6df8e1
Lines Changed: +208, -93

10 Modified Paths:

/source/blender/editors/space_file/file_ops.c (+4, -20) (Diff)
/source/blender/editors/space_file/space_file.c (+0, -4) (Diff)
/source/blender/editors/space_image/image_ops.c (+3, -13) (Diff)
/source/blender/editors/space_sequencer/sequencer_header.c (+4, -4) (Diff)
/source/blender/makesdna/DNA_screen_types.h (+8, -5) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+158, -9) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+8, -33) (Diff)
/source/blender/windowmanager/WM_api.h (+6, -2) (Diff)
/source/blender/windowmanager/wm_event_system.h (+4, -1) (Diff)
/source/blender/windowmanager/wm_event_types.h (+13, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021