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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-25 20:52:42 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-25 20:52:42 +0400
commit97b8a1f752fbe729c20c8398dfa9fdbc2e2e4ff3 (patch)
tree6a05ae94033c624cf4ce97c081813bc2675926a1 /source/blender/editors/animation
parent20b46bbf1a9e5a46d308df7f8aa4f2014485d841 (diff)
Fix #33304: missing 3D view redraw while moving camera markers.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_markers.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 852f3fa5469..4ac7b61fccb 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -706,8 +706,13 @@ static int ed_marker_move_invoke_wrapper(bContext *C, wmOperator *op, wmEvent *e
}
/* note, init has to be called succesfully */
-static void ed_marker_move_apply(wmOperator *op)
+static void ed_marker_move_apply(bContext *C, wmOperator *op)
{
+#ifdef DURIAN_CAMERA_SWITCH
+ bScreen *sc = CTX_wm_screen(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *camera = scene->camera;
+#endif
MarkerMove *mm = op->customdata;
TimeMarker *marker;
int a, offs;
@@ -719,17 +724,27 @@ static void ed_marker_move_apply(wmOperator *op)
a++;
}
}
+
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
+
+#ifdef DURIAN_CAMERA_SWITCH
+ /* so we get view3d redraws */
+ BKE_scene_camera_switch_update(scene);
+
+ if(camera != scene->camera) {
+ BKE_screen_view3d_scene_sync(sc);
+ WM_event_add_notifier(C, NC_SCENE | NA_EDITED, scene);
+ }
+#endif
}
/* only for modal */
static int ed_marker_move_cancel(bContext *C, wmOperator *op)
{
RNA_int_set(op->ptr, "frames", 0);
- ed_marker_move_apply(op);
+ ed_marker_move_apply(C, op);
ed_marker_move_exit(C, op);
-
- WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
return OPERATOR_CANCELLED;
}
@@ -789,7 +804,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
offs = (int)fac;
RNA_int_set(op->ptr, "frames", offs);
- ed_marker_move_apply(op);
+ ed_marker_move_apply(C, op);
/* cruft below is for header print */
for (a = 0, marker = mm->markers->first; marker; marker = marker->next) {
@@ -840,8 +855,6 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
}
}
- WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
ED_area_headerprint(CTX_wm_area(C), str);
}
}
@@ -855,14 +868,11 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
outputNumInput(&mm->num, str_tx);
RNA_int_set(op->ptr, "frames", vec);
- ed_marker_move_apply(op);
+ ed_marker_move_apply(C, op);
// ed_marker_header_update(C, op, str, (int)vec[0]);
// strcat(str, str_tx);
BLI_snprintf(str, sizeof(str), "Marker offset %s", str_tx);
ED_area_headerprint(CTX_wm_area(C), str);
-
- WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
}
}
@@ -872,7 +882,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
static int ed_marker_move_exec(bContext *C, wmOperator *op)
{
if (ed_marker_move_init(C, op)) {
- ed_marker_move_apply(op);
+ ed_marker_move_apply(C, op);
ed_marker_move_exit(C, op);
return OPERATOR_FINISHED;
}