Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-02-16 15:14:04 +0300
committerTon Roosendaal <ton@blender.org>2009-02-16 15:14:04 +0300
commit4154e48c053caf947f2668a168ce38aa10b8481b (patch)
tree294c3173648572d6669a8c85e08a459ba0075ce1 /source/blender/makesdna
parentf6df8e1860d44d6b4d2c9048b0fb0ebdbfd850d3 (diff)
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.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 89bf32ef16d..bc845ec177a 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -44,14 +44,15 @@ struct wmTimer;
typedef struct bScreen {
ID id;
- ListBase vertbase, edgebase;
+ ListBase vertbase; /* screens have vertices/edges to define areas */
+ ListBase edgebase;
ListBase areabase;
- ListBase regionbase; /* screen level regions, runtime only */
- struct Scene *scene;
+ ListBase regionbase; /* screen level regions (menus), runtime only */
- short scenenr, screennr; /* only for pupmenu */
+ struct Scene *scene;
- short full, winid; /* winid from WM, starts with 1 */
+ short full; /* fade out? */
+ short winid; /* winid from WM, starts with 1 */
short do_draw; /* notifier for drawing edges */
short do_refresh; /* notifier for scale screen, changed screen, etc */
short do_draw_gesture; /* notifier for gesture draw. */
@@ -62,6 +63,8 @@ typedef struct bScreen {
short mainwin; /* screensize subwindow, for screenedges and global menus */
short subwinactive; /* active subwindow */
+ int pad2;
+
struct wmTimer *animtimer; /* if set, screen has timer handler added in window */
void *context; /* context callback */